diff options
author | Guido van Rossum <guido@python.org> | 1996-08-21 17:41:54 +0000 |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1996-08-21 17:41:54 +0000 |
commit | 6cdc6f41465e88344b5ed62e45b036cf502f3770 (patch) | |
tree | f601508b8e5d36d8672f1344a90924db482fd702 /Include/abstract.h | |
parent | Added delslice and delitem. (diff) | |
download | cpython-6cdc6f41465e88344b5ed62e45b036cf502f3770.tar.gz cpython-6cdc6f41465e88344b5ed62e45b036cf502f3770.tar.bz2 cpython-6cdc6f41465e88344b5ed62e45b036cf502f3770.zip |
Added PyObject_DelItem and PySequence_Del{Item,Slice}.
Diffstat (limited to 'Include/abstract.h')
-rw-r--r-- | Include/abstract.h | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/Include/abstract.h b/Include/abstract.h index 53b419320ee..956ca89017f 100644 --- a/Include/abstract.h +++ b/Include/abstract.h @@ -410,6 +410,13 @@ xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx*/ statement: o[key]=v. */ + int PyObject_DelItem Py_PROTO((PyObject *o, PyObject *key)); + + /* + Delete the mapping for key from *o. Returns -1 on failure. + This is the equivalent of the Python statement: del o[key]. + */ + /* Number Protocol:*/ @@ -672,6 +679,14 @@ xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx*/ */ + int PySequence_DelItem Py_PROTO((PyObject *o, int i)); + + /* + Delete the ith element of object v. Returns + -1 on failure. This is the equivalent of the Python + statement: del o[i]. + */ + int PySequence_SetSlice Py_PROTO((PyObject *o, int i1, int i2, PyObject *v)); /* @@ -680,6 +695,14 @@ xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx*/ equivalent of the Python statement: o[i1:i2]=v. */ + int PySequence_DelSlice Py_PROTO((PyObject *o, int i1, int i2)); + + /* + Delete the slice in sequence object, o, from i1 to i2. + Returns -1 on failure. This is the equivalent of the Python + statement: del o[i1:i2]. + */ + PyObject *PySequence_Tuple Py_PROTO((PyObject *o)); /* |