Skip to content

Commit 61dd77b

Browse files
authored
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.
1 parent a03ec20 commit 61dd77b

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

Doc/c-api/object.rst

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,8 @@ Object Protocol
4747
4848
.. c:function:: int PyObject_HasAttr(PyObject *o, PyObject *attr_name)
4949
50-
Returns ``1`` if *o* has the attribute *attr_name*, and ``0`` otherwise. This
51-
is equivalent to the Python expression ``hasattr(o, attr_name)``. This function
52-
always succeeds.
50+
Returns ``1`` if *o* has the attribute *attr_name*, and ``0`` otherwise.
51+
This function always succeeds.
5352
5453
.. note::
5554

0 commit comments

Comments
 (0)