From: Sergey B Kirpichev Date: Mon, 8 Jan 2024 15:23:43 +0000 (+0300) Subject: gh-113391: fix outdated PyObject_HasAttr docs (#113420) X-Git-Tag: v3.13.0a3~153 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=61dd77b04ea205f492498d30637f2d516d8e2a8b;p=thirdparty%2FPython%2Fcpython.git gh-113391: fix outdated PyObject_HasAttr docs (#113420) After #53875: PyObject_HasAttr is not an equivalent of hasattr. PyObject_HasAttrWithError is; it already has the note. --- diff --git a/Doc/c-api/object.rst b/Doc/c-api/object.rst index a4e3e74861a3..8a179690d048 100644 --- a/Doc/c-api/object.rst +++ b/Doc/c-api/object.rst @@ -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::