◐ Shell
clean mode source ↗

gh-102213: Optimizing the Performance of __getattr__ #102213 by wangxiang-hz · Pull Request #102248 · python/cpython

when __getattr__ is defined, python with try to find an attribute using _PyObject_GenericGetAttrWithDict
find nothing is reasonable so we don't need an exception, it will hurt performance.

@blurb-it

Fidget-Spinner

@wangxiang-hz

Fidget-Spinner

iritkatriel pushed a commit to iritkatriel/cpython that referenced this pull request

Mar 12, 2023
…102248)

When __getattr__ is defined, python with try to find an attribute using _PyObject_GenericGetAttrWithDict
find nothing is reasonable so we don't need an exception, it will hurt performance.

sobolevn added a commit to sobolevn/cpython that referenced this pull request

Apr 7, 2023

warsaw pushed a commit to warsaw/cpython that referenced this pull request

Apr 11, 2023

sunmy2019 added a commit to sunmy2019/cpython that referenced this pull request

Apr 24, 2023

ambv added a commit to sunmy2019/cpython that referenced this pull request

Apr 25, 2023