Олег Масло <asicsc...@gmail.com> added the comment:

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.

----------
status: pending -> open

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue44520>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to