cpython
cpython copied to clipboard
Outdated PyObject_HasAttr documentation (Exception behavior)
Documentation
In Python 3.13, PyObject_HasAttr doc says:
Exceptions that occur when this calls
__getattr__()and__getattribute__()methods are silently ignored.
But its exception behavior after https://github.com/python/cpython/pull/106674 is to report all exceptions other than AttributeError.
Linked PRs
- gh-125907
Well, it doesn't "report" exceptions, it displays an unraisable error. But yeah, I wouldn't call that silent. I guess it should be changed to something like "Exceptions that occur when this calls __getattr__() and __getattribute__() methods aren't propagated, but instead given to sys.unraisablehook." PR is welcome :)