diff --git a/Doc/c-api/object.rst b/Doc/c-api/object.rst index a25ff244c9f07c6..b56a342d99d1bc5 100644 --- a/Doc/c-api/object.rst +++ b/Doc/c-api/object.rst @@ -81,9 +81,8 @@ Object Protocol return ``0`` on success. This is the equivalent of the Python statement ``o.attr_name = v``. - If *v* is ``NULL``, the attribute is deleted. This behaviour is deprecated - in favour of using :c:func:`PyObject_DelAttr`, but there are currently no - plans to remove it. + Delete the attribute named *attr_name* if *v* is ``NULL``. The function + :c:func:`PyObject_DelAttr` is preferred to delete an attribute. .. c:function:: int PyObject_SetAttrString(PyObject *o, const char *attr_name, PyObject *v) @@ -93,8 +92,8 @@ Object Protocol return ``0`` on success. This is the equivalent of the Python statement ``o.attr_name = v``. - If *v* is ``NULL``, the attribute is deleted, but this feature is - deprecated in favour of using :c:func:`PyObject_DelAttrString`. + Delete the attribute named *attr_name* if *v* is ``NULL``. The function + :c:func:`PyObject_DelAttrString` is preferred to delete an attribute. .. c:function:: int PyObject_GenericSetAttr(PyObject *o, PyObject *name, PyObject *value) diff --git a/Doc/c-api/sequence.rst b/Doc/c-api/sequence.rst index 402a3e5e09ff560..d8cf6f4efea2728 100644 --- a/Doc/c-api/sequence.rst +++ b/Doc/c-api/sequence.rst @@ -69,8 +69,8 @@ Sequence Protocol is the equivalent of the Python statement ``o[i] = v``. This function *does not* steal a reference to *v*. - If *v* is ``NULL``, the element is deleted, but this feature is - deprecated in favour of using :c:func:`PySequence_DelItem`. + Delete the *i*\ th element if *v* is ``NULL``. The function + :c:func:`PySequence_DelItem` is preferred to delete an element. .. c:function:: int PySequence_DelItem(PyObject *o, Py_ssize_t i) @@ -84,6 +84,9 @@ Sequence Protocol Assign the sequence object *v* to the slice in sequence object *o* from *i1* to *i2*. This is the equivalent of the Python statement ``o[i1:i2] = v``. + Delete the elements if *v* is ``NULL``. The function + :c:func:`PySequence_DelSlice` is preferred to delete elements. + .. c:function:: int PySequence_DelSlice(PyObject *o, Py_ssize_t i1, Py_ssize_t i2)