This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

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 <1485116119.24.0.644367803342.issue17720@psf.upfronthosting.co.za>
In-reply-to
Content
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().
History
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: <1485116119.24.0.644367803342.issue17720@psf.upfronthosting.co.za>
2017-01-22 20:15:19serhiy.storchakalinkissue17720 messages
2017-01-22 20:15:18serhiy.storchakacreate