mirror of
https://github.com/python/cpython.git
synced 2025-09-26 10:19:53 +00:00
gh-125887: Update PyObject_HasAttr exception behavior (#125907)
Update PyObject_HasAttr exception behavior Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
This commit is contained in:
parent
401bba6b58
commit
08a0728d6c
1 changed files with 2 additions and 1 deletions
|
@ -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.
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue