Message186774
In pickle.py, load_appends is currently defined as
def load_appends(self):
stack = self.stack
mark = self.marker()
list = stack[mark - 1]
list.extend(stack[mark + 1:])
del stack[mark:]
However, according to the spec of APPENDS, it should actually be:
def load_appends(self):
obj = stack[mark - 1]
items = stack[mark + 1:]
if isinstance(obj, list):
obj.extend(items)
else:
for item in items:
obj.append(item)
This will match with the current behaviour of _pickle. |
|
Date |
User |
Action |
Args |
2013-04-13 18:04:49 | alexandre.vassalotti | set | recipients:
+ alexandre.vassalotti, pitrou, serhiy.storchaka |
2013-04-13 18:04:49 | alexandre.vassalotti | set | messageid: <1365876289.91.0.454785839611.issue17720@psf.upfronthosting.co.za> |
2013-04-13 18:04:49 | alexandre.vassalotti | link | issue17720 messages |
2013-04-13 18:04:49 | alexandre.vassalotti | create | |
|