Author serhiy.storchaka
Recipients alexandre.vassalotti, pitrou, python-dev, serhiy.storchaka
Date 2017-01-22.20:15:18
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
From PEP 7:

    listitems    Optional, and new in this PEP.
                 If this is not None, it should be an iterator (not a
                 sequence!) yielding successive list items.  These list
                 items will be pickled, and appended to the object using
                 either obj.append(item) or obj.extend(list_of_items).
                 This is primarily used for list subclasses, but may
                 be used by other classes as long as they have append()
                 and extend() methods with the appropriate signature.
                 (Whether append() or extend() is used depends on which
                 pickle protocol version is used as well as the number
                 of items to append, so both must be supported.)

Both append() or extend() must be supported, therefore old code was correct. C implementation can be optimized by using extend().
Date User Action Args
2017-01-22 20:15:19serhiy.storchakasetrecipients: + serhiy.storchaka, pitrou, alexandre.vassalotti, python-dev
2017-01-22 20:15:19serhiy.storchakasetmessageid: <>
2017-01-22 20:15:19serhiy.storchakalinkissue17720 messages
2017-01-22 20:15:18serhiy.storchakacreate