diff options
author | INADA Naoki <methane@users.noreply.github.com> | 2018-01-16 11:52:41 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-01-16 11:52:41 (GMT) |
commit | 378edee0a3b913d60653dc17dfe61d83405a8135 (patch) | |
tree | e91c9b9b446aa0ce076da778bde6c1da27ff5e23 /Objects/descrobject.c | |
parent | b44c5169f64178d2ff2914187b315549e7ab0cb6 (diff) | |
download | cpython-378edee0a3b913d60653dc17dfe61d83405a8135.zip cpython-378edee0a3b913d60653dc17dfe61d83405a8135.tar.gz cpython-378edee0a3b913d60653dc17dfe61d83405a8135.tar.bz2 |
bpo-32544: Speed up hasattr() and getattr() (GH-5173)
AttributeError was raised always when attribute is not found.
This commit skip raising AttributeError when `tp_getattro` is `PyObject_GenericGetAttr`.
It makes hasattr() and getattr() about 4x faster when attribute is not found.
Diffstat (limited to 'Objects/descrobject.c')
0 files changed, 0 insertions, 0 deletions