File tree Expand file tree Collapse file tree 2 files changed +9
-7
lines changed Expand file tree Collapse file tree 2 files changed +9
-7
lines changed Original file line number Diff line number Diff line change @@ -81,9 +81,8 @@ Object Protocol
81
81
return ``0 `` on success. This is the equivalent of the Python statement
82
82
``o.attr_name = v ``.
83
83
84
- If *v * is ``NULL ``, the attribute is deleted. This behaviour is deprecated
85
- in favour of using :c:func: `PyObject_DelAttr `, but there are currently no
86
- plans to remove it.
84
+ Delete the attribute named *attr_name * if *v * is ``NULL ``. The function
85
+ :c:func: `PyObject_DelAttr ` is preferred to delete an attribute.
87
86
88
87
89
88
.. c :function :: int PyObject_SetAttrString (PyObject *o, const char *attr_name, PyObject *v)
@@ -93,8 +92,8 @@ Object Protocol
93
92
return ``0 `` on success. This is the equivalent of the Python statement
94
93
``o.attr_name = v ``.
95
94
96
- If * v * is ``NULL ``, the attribute is deleted, but this feature is
97
- deprecated in favour of using :c:func: `PyObject_DelAttrString `.
95
+ Delete the attribute named * attr_name * if * v * is ``NULL ``. The function
96
+ :c:func: `PyObject_DelAttrString ` is preferred to delete an attribute .
98
97
99
98
100
99
.. c :function :: int PyObject_GenericSetAttr (PyObject *o, PyObject *name, PyObject *value)
Original file line number Diff line number Diff line change @@ -69,8 +69,8 @@ Sequence Protocol
69
69
is the equivalent of the Python statement ``o[i] = v ``. This function *does
70
70
not * steal a reference to *v *.
71
71
72
- If * v * is ``NULL ``, the element is deleted, but this feature is
73
- deprecated in favour of using :c:func: `PySequence_DelItem `.
72
+ Delete the * i * \ th element if * v * is ``NULL ``. The function
73
+ :c:func: `PySequence_DelItem ` is preferred to delete an element .
74
74
75
75
76
76
.. c :function :: int PySequence_DelItem (PyObject *o, Py_ssize_t i)
@@ -84,6 +84,9 @@ Sequence Protocol
84
84
Assign the sequence object *v * to the slice in sequence object *o * from *i1 * to
85
85
*i2 *. This is the equivalent of the Python statement ``o[i1:i2] = v ``.
86
86
87
+ Delete the elements if *v * is ``NULL ``. The function
88
+ :c:func: `PySequence_DelSlice ` is preferred to delete elements.
89
+
87
90
88
91
.. c :function :: int PySequence_DelSlice (PyObject *o, Py_ssize_t i1, Py_ssize_t i2)
89
92
You can’t perform that action at this time.
0 commit comments