summaryrefslogtreecommitdiffstats
path: root/Lib/pickletools.py
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2015-10-13 18:20:14 (GMT)
committerSerhiy Storchaka <storchaka@gmail.com>2015-10-13 18:20:14 (GMT)
commitdbc517c2dd273f70d2608fd514477fbac459fcab (patch)
treef2ed81a86c3ad8c4fddb8ea159bb14f79a0b06d7 /Lib/pickletools.py
parentca77aef31b16c637efd3fdaacaf25123f71e848f (diff)
downloadcpython-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/pickletools.py')
-rw-r--r--Lib/pickletools.py1
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