8000 Update PyObject_HasAttr exception behavior · python/cpython@7cf71ea · GitHub
[go: up one dir, main page]

Skip to content

Commit 7cf71ea

Browse files
committed
Update PyObject_HasAttr exception behavior
1 parent d3be6f9 commit 7cf71ea

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Doc/c-api/object.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -111,9 +111,9 @@ 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`.
116+
.
117117
118118
119119
.. c:function:: int PyObject_HasAttrString(PyObject *o, const char *attr_name)

0 commit comments

Comments
 (0)
0