mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
Merge 3.3
This commit is contained in:
commit
f3bc946628
3 changed files with 65 additions and 6 deletions
|
@ -1156,8 +1156,14 @@ class _Unpickler:
|
|||
def load_appends(self):
|
||||
stack = self.stack
|
||||
mark = self.marker()
|
||||
list = stack[mark - 1]
|
||||
list.extend(stack[mark + 1:])
|
||||
list_obj = stack[mark - 1]
|
||||
items = stack[mark + 1:]
|
||||
if isinstance(list_obj, list):
|
||||
list_obj.extend(items)
|
||||
else:
|
||||
append = list_obj.append
|
||||
for item in items:
|
||||
append(item)
|
||||
del stack[mark:]
|
||||
dispatch[APPENDS[0]] = load_appends
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue