[issue4757] reject unicode in zlib
flox
report at bugs.python.org
Mon Dec 14 14:55:33 CET 2009
flox <laxyf at yahoo.fr> added the comment:
Definitely, zlib.compress should raise a TypeError (like bz2 does).
>>> import bz2, zlib
>>> bz2.compress('abc')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: argument 1 must be bytes or buffer, not str
>>> zlib.compress('abc')
b"x\x9cKLJ\x06\x00\x02M\x01'"
Someone can review the patch and merge it?
----------
nosy: +flox
versions: +Python 3.2 -Python 3.0
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue4757>
_______________________________________
More information about the Python-bugs-list
mailing list