_
_
_
_
_
_
WARNING: PyList_SetItem does not increment the new item's reference count, but does decrement the reference count of the item it replaces, if not nil. It does *decrement* the reference count if it is *not* inserted in the list. Similarly, PyList_GetItem does not increment the returned item's reference count.
_
_
_
_
_
WARNING: PyList_SetItem does not increment the new item's reference count, but does decrement the reference count of the item it replaces, if not nil. It does *decrement* the reference count if it is *not* inserted in the list. Similarly, PyList_GetItem does not increment the returned item's reference count.
_
_
_
ob_item contains space for 'allocated' elements. The number currently in use is ob_size. Invariants: 0 <= ob_size <= allocated len(list) == ob_size ob_item == NULL implies ob_size == allocated == 0 list.sort() temporarily sets allocated to -1 to detect mutations.
Mirror listobject.h
Another generally useful object type is an list of object pointers. This is a mutable type: the list items can be changed, and items can be added or removed. Out-of-range indices or non-list objects are ignored.