mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
Added PyObject_DelItem and PySequence_Del{Item,Slice}.
This commit is contained in:
parent
c9fb47ef08
commit
6cdc6f4146
2 changed files with 84 additions and 0 deletions
|
@ -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));
|
||||
|
||||
/*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue