summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSergey B Kirpichev <skirpichev@gmail.com>2024-01-08 15:23:43 (GMT)
committerGitHub <noreply@github.com>2024-01-08 15:23:43 (GMT)
commit61dd77b04ea205f492498d30637f2d516d8e2a8b (patch)
tree4e776b00f7661884653311cd95f2e1195f152b4c
parenta03ec20bcdf757138557127689405b3a525b3c44 (diff)
downloadcpython-61dd77b04ea205f492498d30637f2d516d8e2a8b.zip
cpython-61dd77b04ea205f492498d30637f2d516d8e2a8b.tar.gz
cpython-61dd77b04ea205f492498d30637f2d516d8e2a8b.tar.bz2
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.
-rw-r--r--Doc/c-api/object.rst5
1 files 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::