[Python-Dev] Unpickling py2 str as py3 bytes (and vice versa) - implementation (issue #6784)

Merlijn van Deen valhallasw at arctus.nl
Sat Mar 17 10:14:07 CET 2012


On 17 March 2012 00:57, Guido van Rossum <guido at python.org> wrote:
> OK, how about using encoding=bytes (yes, the type object!)? Or 'bytes' ?

encoding=bytes makes (at least intuitive) sense to me;
encoding='bytes' would imply there is an encoding with name 'bytes'
that somehow does b''.decode('bytes')=b'', and would disallow anyone
to create a new encoding with the name 'bytes'.

I'll take a look at rewriting my patch later this weekend, and I'll
also give the documentation  (both the 'consider not using pickle for
long time storage' and the docs for this setting) some thought.

Best,
Merlijn


More information about the Python-Dev mailing list