diff options
Diffstat (limited to 'Lib/pickletools.py')
-rw-r--r-- | Lib/pickletools.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/pickletools.py b/Lib/pickletools.py index 16ae7d56b9..5e129b5b56 100644 --- a/Lib/pickletools.py +++ b/Lib/pickletools.py @@ -707,7 +707,7 @@ def read_unicodestring8(f): >>> enc = s.encode('utf-8') >>> enc b'abcd\xea\xaf\x8d' - >>> n = bytes([len(enc)]) + bytes(7) # little-endian 8-byte length + >>> n = bytes([len(enc)]) + b'\0' * 7 # little-endian 8-byte length >>> t = read_unicodestring8(io.BytesIO(n + enc + b'junk')) >>> s == t True @@ -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 |