This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author asicscwcs
Recipients asicscwcs, eric.smith, iritkatriel, orsenthil, serhiy.storchaka
Date 2021-07-02.11:34:53
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1625225693.13.0.854095096443.issue44520@roundup.psfhosted.org>
In-reply-to
Content
If you pass None to the quote_from_bytes function, then there is no point in the "if not bs" check, because it won't even reach it. 

This function is not with dynamic behavior, which violates python concepts. If you pass a string instead of bytes, it will throw a TypeError exception, it's ok. But if for some reason you need to pass None, and this happens, then the function does not behave as expected.

Why even check that bs is not None, if this can never be? And if it does, there will always be a TypeError exception.
History
Date User Action Args
2021-07-02 11:34:53asicscwcssetrecipients: + asicscwcs, orsenthil, eric.smith, serhiy.storchaka, iritkatriel
2021-07-02 11:34:53asicscwcssetmessageid: <1625225693.13.0.854095096443.issue44520@roundup.psfhosted.org>
2021-07-02 11:34:53asicscwcslinkissue44520 messages
2021-07-02 11:34:53asicscwcscreate