summaryrefslogtreecommitdiffstats
path: root/Objects/descrobject.c
diff options
context:
space:
mode:
authorINADA Naoki <methane@users.noreply.github.com>2018-01-16 11:52:41 (GMT)
committerGitHub <noreply@github.com>2018-01-16 11:52:41 (GMT)
commit378edee0a3b913d60653dc17dfe61d83405a8135 (patch)
treee91c9b9b446aa0ce076da778bde6c1da27ff5e23 /Objects/descrobject.c
parentb44c5169f64178d2ff2914187b315549e7ab0cb6 (diff)
downloadcpython-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