From 4993177a475f564b3a9b5dfb812fdf23cb49d81d Mon Sep 17 00:00:00 2001 From: Serhiy Storchaka Date: Sun, 11 Sep 2016 14:41:02 +0300 Subject: Use sequence repetition instead of bytes constructor with integer argument. --- Lib/pickletools.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Lib/pickletools.py') diff --git a/Lib/pickletools.py b/Lib/pickletools.py index 4eefc19fdb..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 -- cgit v1.2.1