From: Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> Date: Fri, 29 Nov 2024 10:59:13 +0000 (+0100) Subject: [3.13] fix param type in PyObject_HasAttrWithError (docs) (GH-127403) (#127404) X-Git-Tag: v3.13.1~41 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=92d14b7fab38e1fdd592bc7c22b6898ac6c7231c;p=thirdparty%2FPython%2Fcpython.git [3.13] fix param type in PyObject_HasAttrWithError (docs) (GH-127403) (#127404) fix param type in PyObject_HasAttrWithError (docs) (GH-127403) (cherry picked from commit 3afb639f39e89888194d8e74cc498c8da3a58d8e) Co-authored-by: biggus-developerus <74741815+biggus-developerus@users.noreply.github.com> --- diff --git a/Doc/c-api/object.rst b/Doc/c-api/object.rst index 630114a43391..1e822fad13aa 100644 --- a/Doc/c-api/object.rst +++ b/Doc/c-api/object.rst @@ -85,7 +85,7 @@ Object Protocol instead of the :func:`repr`. -.. c:function:: int PyObject_HasAttrWithError(PyObject *o, const char *attr_name) +.. c:function:: int PyObject_HasAttrWithError(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)``.