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.
iritkatriel pushed a commit to iritkatriel/cpython that referenced this pull request
…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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters