mirror of
https://github.com/python/cpython.git
synced 2025-12-09 10:37:17 +00:00
load_appends(): replaced .append() loop with an .extend().
This commit is contained in:
parent
c23d18a955
commit
209ad95b00
1 changed files with 1 additions and 3 deletions
|
|
@ -1021,9 +1021,7 @@ class Unpickler:
|
||||||
stack = self.stack
|
stack = self.stack
|
||||||
mark = self.marker()
|
mark = self.marker()
|
||||||
list = stack[mark - 1]
|
list = stack[mark - 1]
|
||||||
for i in range(mark + 1, len(stack)):
|
list.extend(stack[mark + 1:])
|
||||||
list.append(stack[i])
|
|
||||||
|
|
||||||
del stack[mark:]
|
del stack[mark:]
|
||||||
dispatch[APPENDS] = load_appends
|
dispatch[APPENDS] = load_appends
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue