Kay Hayen <[email protected]> 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 <[email protected]>
<http://bugs.python.org/issue13735>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com