[issue4757] reject unicode in zlib

STINNER Victor report at bugs.python.org
Sun Jan 4 23:51:13 CET 2009


STINNER Victor <victor.stinner at haypocalc.com> added the comment:

> The fact that Python 2.x also accepts Unicode ASCII strings 
> where strings are normally expected is intended to help with 
> the migration to Unicode

I hate this behaviour. It doesn't help migration, it's the opposite! Sometimes 
it works (ASCII), and somtimes it fails (just one non-ASCII character). And 
then we will read "Unicode sucks!" because people doesn't understand the 
error.

> In Python 3.x, it's probably better to use bytes throughout the
> API.

I propose to reject unicode in Python 3.x and display a warning for Python 
2.x. A warning to prepare the migration... not to Unicode, but to Python3 ;-)

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


More information about the Python-bugs-list mailing list