Message286028
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:19 | serhiy.storchaka | set | recipients:
+ serhiy.storchaka, pitrou, alexandre.vassalotti, python-dev |
2017-01-22 20:15:19 | serhiy.storchaka | set | messageid: <1485116119.24.0.644367803342.issue17720@psf.upfronthosting.co.za> |
2017-01-22 20:15:19 | serhiy.storchaka | link | issue17720 messages |
2017-01-22 20:15:18 | serhiy.storchaka | create | |
|