https://github.com/python/cpython/commit/08a0728d6c32986d35edb26872b4512a71ae60f3 commit: 08a0728d6c32986d35edb26872b4512a71ae60f3 branch: main author: Damien <[email protected]> committer: hauntsaninja <[email protected]> date: 2024-12-26T17:57:55-08:00 summary:
gh-125887: Update PyObject_HasAttr exception behavior (#125907) Update PyObject_HasAttr exception behavior Co-authored-by: Shantanu <[email protected]> files: M Doc/c-api/object.rst diff --git a/Doc/c-api/object.rst b/Doc/c-api/object.rst index f97ade01e67850..a137688fe07545 100644 --- a/Doc/c-api/object.rst +++ b/Doc/c-api/object.rst @@ -111,7 +111,8 @@ Object Protocol .. note:: Exceptions that occur when this calls :meth:`~object.__getattr__` and - :meth:`~object.__getattribute__` methods are silently ignored. + :meth:`~object.__getattribute__` methods aren't propagated, + but instead given to :func:`sys.unraisablehook`. For proper error handling, use :c:func:`PyObject_HasAttrWithError`, :c:func:`PyObject_GetOptionalAttr` or :c:func:`PyObject_GetAttr` instead. _______________________________________________ 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]
