diff options
Diffstat (limited to 'Doc')
-rw-r--r-- | Doc/extref.tex | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/Doc/extref.tex b/Doc/extref.tex index 755539a..b7249a6 100644 --- a/Doc/extref.tex +++ b/Doc/extref.tex @@ -202,6 +202,12 @@ From the viewpoint of of C access to Python services, we have: of the Python statement: \code{o[key]=v}. + \code{int PyObject_DelItem(PyObject *o, PyObject *key, PyObject *v)}\\ + Delete the mapping for \code{key} from \code{*o}. Returns -1 + on failure. + This is the equivalent of the Python statement: del o[key]. + + \subsubsection{Number Protocol} \code{int PyNumber_Check(PyObject *o)}\\ @@ -361,11 +367,21 @@ From the viewpoint of of C access to Python services, we have: Returns -1 on failure. This is the equivalent of the Python statement, \code{o[i]=v}. + \code{int PySequence_DelItem(PyObject *o, int i)}\\ + Delete the \code{i}th element of object \code{v}. Returns + -1 on failure. This is the equivalent of the Python + statement: \code{del o[i]}. + \code{int PySequence_SetSlice(PyObject *o, int i1, int i2, PyObject *v)}\\ Assign the sequence object \code{v} to the slice in sequence object \code{o} from \code{i1} to \code{i2}. This is the equivalent of the Python statement, \code{o[i1:i2]=v}. + \code{int PySequence_DelSlice(PyObject *o, int i1, int i2)}\\ + Delete the slice in sequence object, \code{o}, from \code{i1} to \code{i2}. + Returns -1 on failure. This is the equivalent of the Python + statement: \code{del o[i1:i2]}. + \code{PyObject *PySequence_Tuple(PyObject *o)}\\ Returns the \code{o} as a tuple on success, and NULL on failure. This is equivalent to the Python expression: \code{tuple(o)}. |