Merlijn van Deen <valhall...@gmail.com> added the comment: OK, this is the pickle.py patch. A new parameter 'bytestr' has been added to both _Pickler and _Unpickler to toggle the pickle.string<=>bytes behaviour:
_Pickler: IF protocol <= 2 AND bytestr=True THEN bytes are stored as STRING/SHORT_BINSTRING/BINSTRING ELSE (the old behaviour; obj for protocol <=2, else BINARY) _Unpickler: IF bytestr=True THEN STRING/SHORT_BINSTRING/BINSTRING are read as bytes ELSE they are read as str (old behaviour) I also extracted the decoding stuff from the three string reading functions to a single one. ---------- keywords: +patch Added file: http://bugs.python.org/file24568/pickle.py.patch _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue6784> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com