From 61dd77b04ea205f492498d30637f2d516d8e2a8b Mon Sep 17 00:00:00 2001 From: Sergey B Kirpichev Date: Mon, 8 Jan 2024 18:23:43 +0300 Subject: 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. --- Doc/c-api/object.rst | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Doc/c-api/object.rst b/Doc/c-api/object.rst index a4e3e74..8a17969 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:: -- cgit v0.12