[issue13735] The protocol > 0 of cPickle does not given stable dictionary values
Kay Hayen
report at bugs.python.org
Sun Jan 8 19:41:41 CET 2012
Kay Hayen <kayhayen at gmx.de> added the comment:
It seems that there is an extra "BINPUT 2", whatever it does. I am attaching a variant that does pickletools.dis on the 3 dumps.
Protocol 2 :
Dumping read const const stream '\x80\x02}q\x01U\x07modulesq\x02Ns.'
0: \x80 PROTO 2
2: } EMPTY_DICT
3: q BINPUT 1
5: U SHORT_BINSTRING 'modules'
14: q BINPUT 2
16: N NONE
17: s SETITEM
18: . STOP
highest protocol among opcodes = 2
Dumping load const const stream '\x80\x02}q\x01U\x07modulesNs.'
0: \x80 PROTO 2
2: } EMPTY_DICT
3: q BINPUT 1
5: U SHORT_BINSTRING 'modules'
14: N NONE
15: s SETITEM
16: . STOP
highest protocol among opcodes = 2
Dumping load const const stream '\x80\x02}q\x01U\x07modulesNs.'
0: \x80 PROTO 2
2: } EMPTY_DICT
3: q BINPUT 1
5: U SHORT_BINSTRING 'modules'
14: N NONE
15: s SETITEM
16: . STOP
highest protocol among opcodes = 2
----------
Added file: http://bugs.python.org/file24180/stream.py
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue13735>
_______________________________________
More information about the Python-bugs-list
mailing list