You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Use _PyObject_LookupAttr() instead of PyObject_GetAttr() #106303
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.
Activity
pythongh-106303: Use _PyObject_LookupAttr() instead of PyObject_GetAt…
gh-106303: Use _PyObject_LookupAttr() instead of PyObject_GetAttr() (G…
[3.11] pythongh-106303: Use _PyObject_LookupAttr() instead of PyObjec…
[3.12] pythongh-106303: Use _PyObject_LookupAttr() instead of PyObjec…