[issue13505] Bytes objects pickled in 3.x with protocol <=2 are unpickled incorrectly in 2.x

Antoine Pitrou report at bugs.python.org
Mon Dec 12 18:39:16 CET 2011


Antoine Pitrou <pitrou at free.fr> added the comment:

> Only worry is that codecs.latin_1_encode.__module__ is '_codecs', and
> _codecs is undocumented.

It seems we have to choose between two evils here. Given that the codecs.latin_1_encode produces more compact pickles, I'd say go for it.

Note that for the empty bytes object (b""), the encoding can be massively simplified by simply calling bytes() with no argument.

----------

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


More information about the Python-bugs-list mailing list