diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2015-10-13 18:20:14 (GMT) |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2015-10-13 18:20:14 (GMT) |
commit | dbc517c2dd273f70d2608fd514477fbac459fcab (patch) | |
tree | f2ed81a86c3ad8c4fddb8ea159bb14f79a0b06d7 /Lib | |
parent | ca77aef31b16c637efd3fdaacaf25123f71e848f (diff) | |
download | cpython-dbc517c2dd273f70d2608fd514477fbac459fcab.zip cpython-dbc517c2dd273f70d2608fd514477fbac459fcab.tar.gz cpython-dbc517c2dd273f70d2608fd514477fbac459fcab.tar.bz2 |
Issue #25382: pickletools.dis() now outputs implicit memo index for the
MEMOIZE opcode.
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/pickletools.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/Lib/pickletools.py b/Lib/pickletools.py index cf5df41..43dedb3 100644 --- a/Lib/pickletools.py +++ b/Lib/pickletools.py @@ -2440,6 +2440,7 @@ def dis(pickle, out=None, memo=None, indentlevel=4, annotate=0): if opcode.name in ("PUT", "BINPUT", "LONG_BINPUT", "MEMOIZE"): if opcode.name == "MEMOIZE": memo_idx = len(memo) + markmsg = "(as %d)" % memo_idx else: assert arg is not None memo_idx = arg |