[issue12596] cPickle - stored data differ for same dictionary

Ramchandra Apte report at bugs.python.org
Thu Feb 7 13:30:32 CET 2013


Ramchandra Apte added the comment:

Further proof:
here are the results of two invocations of `./python -R -c "import pickle; print(pickle.dumps({'a':1, 'v':1}))"`

b'\x80\x03}q\x00(X\x01\x00\x00\x00vq\x01K\x01X\x01\x00\x00\x00aq\x02K\x01u.'
b'\x80\x03}q\x00(X\x01\x00\x00\x00aq\x01K\x01X\x01\x00\x00\x00vq\x02K\x01u.'
Notice that in the second pickled data, the pickled data for 'v' has exchanged places with the one for 'a'! ('v' has become 'a' and at the second-last character 'a' has become 'v')

----------

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


More information about the Python-bugs-list mailing list