[issue13641] decoding functions in the base64 module could accept unicode strings

R. David Murray report at bugs.python.org
Mon Feb 20 03:13:32 CET 2012


R. David Murray <rdmurray at bitdance.com> added the comment:

OK' I'm back to being 100% on the side of rejecting both of these changes.  ASCII is not unocode, it is bytes.  You can decode it to unicode but it is not unicode.  Those transformations operate bytes to bytes, not bytes to unicode.

We made the bytes unicode separation to avoid the problem where you have a working program that unexpectedly gets non ASCII input and blows up with a unicode error.  IMO these patches are reintroducing that problem.  The programer should have to explicitly encode to ASCII if they are inadvisedly workimg with it in a string as part of a wire protocol (why else would they be using these transforms).

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue13641>
_______________________________________


More information about the Python-bugs-list mailing list