]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-113391: fix outdated PyObject_HasAttr docs (#113420)
authorSergey B Kirpichev <skirpichev@gmail.com>
Mon, 8 Jan 2024 15:23:43 +0000 (18:23 +0300)
committerGitHub <noreply@github.com>
Mon, 8 Jan 2024 15:23:43 +0000 (16:23 +0100)
After #53875: PyObject_HasAttr is not an equivalent of hasattr.
PyObject_HasAttrWithError is; it already has the note.

Doc/c-api/object.rst

index a4e3e74861a31529d07191f9c392c1e8657052cc..8a179690d048e39b7c9aa0f91943a3662c96c3f5 100644 (file)
@@ -47,9 +47,8 @@ Object Protocol
 
 .. c:function:: int PyObject_HasAttr(PyObject *o, PyObject *attr_name)
 
-   Returns ``1`` if *o* has the attribute *attr_name*, and ``0`` otherwise.  This
-   is equivalent to the Python expression ``hasattr(o, attr_name)``.  This function
-   always succeeds.
+   Returns ``1`` if *o* has the attribute *attr_name*, and ``0`` otherwise.
+   This function always succeeds.
 
    .. note::