diff options
author | Guido van Rossum <guido@python.org> | 1996-08-21 19:08:12 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1996-08-21 19:08:12 (GMT) |
commit | d0f11dec30378688ced23e21623f541c3ff008c3 (patch) | |
tree | 8f8568a2664ba16e8799ba90b4b800ded41d91c4 /Doc | |
parent | 360a934609dac24604ca4ca70e11c53892819452 (diff) | |
download | cpython-d0f11dec30378688ced23e21623f541c3ff008c3.zip cpython-d0f11dec30378688ced23e21623f541c3ff008c3.tar.gz cpython-d0f11dec30378688ced23e21623f541c3ff008c3.tar.bz2 |
Added documentation for PyObject_DelItem and PySequence_Del{Item,Slice}.
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)}. |