cpython icon indicating copy to clipboard operation
cpython copied to clipboard

Outdated PyObject_HasAttr documentation (Exception behavior)

Open sklam opened this issue 1 year ago • 1 comments

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

sklam avatar Oct 23 '24 16:10 sklam

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 :)

ZeroIntensity avatar Oct 23 '24 20:10 ZeroIntensity