https://github.com/python/cpython/commit/61dd77b04ea205f492498d30637f2d516d8e2a8b
commit: 61dd77b04ea205f492498d30637f2d516d8e2a8b
branch: main
author: Sergey B Kirpichev <[email protected]>
committer: encukou <[email protected]>
date: 2024-01-08T16:23:43+01:00
summary:

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.

files:
M Doc/c-api/object.rst

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::
 

_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-checkins.python.org/
Member address: [email protected]

Reply via email to