-
-
Notifications
You must be signed in to change notification settings - Fork 32.4k
Closed
Labels
type-featureA feature request or enhancementA feature request or enhancement
Description
PyObject_GetAttr()
followed by PyErr_ExceptionMatches(PyExc_AttributeError)
and PyErr_Clear()
can be replaced with _PyObject_LookupAttr()
. It is faster, because it avoids raising the AttributeError exception which later be caught and dropped at first place. And it leads to simpler code. Most of code already uses _PyObject_LookupAttr()
, but some new code was added recently which still use the old idiom.
Linked PRs
sunmy2019
Metadata
Metadata
Assignees
Labels
type-featureA feature request or enhancementA feature request or enhancement