File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -3304,13 +3304,18 @@ \subsection{List Objects \label{listObjects}}
33043304\begin {cfuncdesc }{int}{PyList_SetItem}{PyObject *list, int index,
33053305 PyObject *item}
33063306Sets the item at index \var {index} in list to \var {item}.
3307- \strong {Note:} This function `` steals'' a reference to \var {item}.
3307+ \strong {Note:} This function `` steals'' a reference to \var {item} and
3308+ discards a reference to an item already in the list at the affected
3309+ position.
33083310\end {cfuncdesc }
33093311
33103312\begin {cfuncdesc }{PyObject*}{PyList_SET_ITEM}{PyObject *list, int i,
33113313 PyObject *o}
33123314Macro form of \cfunction {PyList_SetItem()} without error checking.
3313- \strong {Note:} This function `` steals'' a reference to \var {item}.
3315+ \strong {Note:} This function `` steals'' a reference to \var {item},
3316+ and, unlike \cfunction {PyList_SetItem()}, does \emph {not } discard a
3317+ reference to any item that it being replaced. This is normally only
3318+ used to fill in new lists where there is no previous content..
33143319\end {cfuncdesc }
33153320
33163321\begin {cfuncdesc }{int}{PyList_Insert}{PyObject *list, int index,
You can’t perform that action at this time.
0 commit comments