diff --git a/Lib/pickle.py b/Lib/pickle.py index b6fb41961a4..62f7a5849a7 100644 --- a/Lib/pickle.py +++ b/Lib/pickle.py @@ -1021,9 +1021,7 @@ class Unpickler: stack = self.stack mark = self.marker() list = stack[mark - 1] - for i in range(mark + 1, len(stack)): - list.append(stack[i]) - + list.extend(stack[mark + 1:]) del stack[mark:] dispatch[APPENDS] = load_appends