Author alexandre.vassalotti
Recipients alexandre.vassalotti, pitrou, serhiy.storchaka
Date 2013-04-13.18:04:49
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1365876289.91.0.454785839611.issue17720@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2013-04-13 18:04:49alexandre.vassalottisetrecipients: + alexandre.vassalotti, pitrou, serhiy.storchaka
2013-04-13 18:04:49alexandre.vassalottisetmessageid: <1365876289.91.0.454785839611.issue17720@psf.upfronthosting.co.za>
2013-04-13 18:04:49alexandre.vassalottilinkissue17720 messages
2013-04-13 18:04:49alexandre.vassalotticreate