• INADA Naoki's avatar
    bpo-32544: Speed up hasattr() and getattr() (GH-5173) · 378edee0
    INADA Naoki yazdı
    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.
    378edee0
_threadmodule.c 43.6 KB