summaryrefslogtreecommitdiffstats
path: root/Misc/NEWS.d
diff options
context:
space:
mode:
authorwangxiang-hz <34048878+wangxiang-hz@users.noreply.github.com>2023-03-11 11:11:37 (GMT)
committerGitHub <noreply@github.com>2023-03-11 11:11:37 (GMT)
commitaa0a73d1bc53dcb6348a869df1e775138991e561 (patch)
tree66ad74f8d199076d88e5150b999895cd15807560 /Misc/NEWS.d
parent5ffdaf748d98da6065158534720f1996a45a0072 (diff)
downloadcpython-aa0a73d1bc53dcb6348a869df1e775138991e561.zip
cpython-aa0a73d1bc53dcb6348a869df1e775138991e561.tar.gz
cpython-aa0a73d1bc53dcb6348a869df1e775138991e561.tar.bz2
gh-102213: Optimize the performance of `__getattr__` (GH-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.
Diffstat (limited to 'Misc/NEWS.d')
-rw-r--r--Misc/NEWS.d/next/Core and Builtins/2023-02-26-13-12-55.gh-issue-102213.fTH8X7.rst1
1 files changed, 1 insertions, 0 deletions
diff --git a/Misc/NEWS.d/next/Core and Builtins/2023-02-26-13-12-55.gh-issue-102213.fTH8X7.rst b/Misc/NEWS.d/next/Core and Builtins/2023-02-26-13-12-55.gh-issue-102213.fTH8X7.rst
new file mode 100644
index 0000000..997bef2
--- /dev/null
+++ b/Misc/NEWS.d/next/Core and Builtins/2023-02-26-13-12-55.gh-issue-102213.fTH8X7.rst
@@ -0,0 +1 @@
+Fix performance loss when accessing an object's attributes with ``__getattr__`` defined.