[issue13735] The protocol > 0 of cPickle does not given stable dictionary values

Antoine Pitrou report at bugs.python.org
Sun Jan 8 19:46:53 CET 2012


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

Ah, right. BINPUT is used to memoize objects in case a restructive structure happens. You can use pickletools.optimize() to remove the useless BINPUTs out of a pickle stream.

Note that 3.x is more consistent and always emits the BINPUTs. It seems 2.x's cPickle (which is really a weird piece of code) may do some premature optimization here.

----------

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


More information about the Python-bugs-list mailing list