load_appends(): replaced .append() loop with an .extend().
authorTim Peters <tim.peters@gmail.com>
Tue, 28 Jan 2003 01:44:45 +0000 (01:44 +0000)
committerTim Peters <tim.peters@gmail.com>
Tue, 28 Jan 2003 01:44:45 +0000 (01:44 +0000)
Lib/pickle.py

index b6fb41961a4268b77c9853768f65a87971fbfa61..62f7a5849a725614a90c8e73888e8bd276f4336e 100644 (file)
@@ -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