From c1579c4f02898a10d55533d0aca81e3910a93f47 Mon Sep 17 00:00:00 2001 From: Sergey B Kirpichev Date: Sat, 23 Dec 2023 04:47:30 +0300 Subject: [PATCH] gh-113391: fix outdated PyObject_HasAttr sphinx docs After #53875: PyObject_HasAttr is not an equivalent of hasattr, PyObject_HasAttrWithError - is. --- 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 a4e3e74861a315..8a179690d048e3 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::