Skip to content

Commit a34a709

Browse files
committed
Update PyObject_HasAttr exception behavior
1 parent d3be6f9 commit a34a709

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
@@ -111,9 +111,8 @@ Object Protocol
111111
.. note::
112112
113113
Exceptions that occur when this calls :meth:`~object.__getattr__` and
114-
:meth:`~object.__getattribute__` methods are silently ignored.
115-
For proper error handling, use :c:func:`PyObject_HasAttrWithError`,
116-
:c:func:`PyObject_GetOptionalAttr` or :c:func:`PyObject_GetAttr` instead.
114+
:meth:`~object.__getattribute__` methods are aren't propagated,
115+
but instead given to :func:`sys.unraisablehook`.
117116
118117
119118
.. c:function:: int PyObject_HasAttrString(PyObject *o, const char *attr_name)

0 commit comments

Comments
 (0)