Try this in Python 3.0 trunk. >>> import zlib >>> s='This is a string' >>> sc=zlib.compress(s) >>> sc bytearray(b'x\x9c\x0b\xc9\xc8,V\x00\xa2D\x85\xe2\x92\xa2\xcc\xbct\x00/\xc2\x05\xcd') >>> zlib.decompress(sc) bytearray(b'This is a string') >>>
This is wrong behavior as compress functions should return byte ,not a bytearray. Same for decompress. Saw this while trying to write a patch for #3382. Shall I file an issue ? Thanks -- -Anand _______________________________________________ Python-3000 mailing list Python-3000@python.org http://mail.python.org/mailman/listinfo/python-3000 Unsubscribe: http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com