From dbc517c2dd273f70d2608fd514477fbac459fcab Mon Sep 17 00:00:00 2001 From: Serhiy Storchaka Date: Tue, 13 Oct 2015 21:20:14 +0300 Subject: Issue #25382: pickletools.dis() now outputs implicit memo index for the MEMOIZE opcode. --- Lib/pickletools.py | 1 + Misc/NEWS | 3 +++ 2 files changed, 4 insertions(+) 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 diff --git a/Misc/NEWS b/Misc/NEWS index 142360e..2700ad3 100644 --- a/Misc/NEWS +++ b/Misc/NEWS @@ -56,6 +56,9 @@ Core and Builtins Library ------- +- Issue #25382: pickletools.dis() now outputs implicit memo index for the + MEMOIZE opcode. + - Issue #25357: Add an optional newline paramer to binascii.b2a_base64(). base64.b64encode() uses it to avoid a memory copy. -- cgit v0.12