SIGN IN SIGN UP

bpo-40137: Optimize _PyType_GetModuleByDef() loop (GH-25505)

PyType_Ready() now ensures that a type MRO cannot be empty.

_PyType_GetModuleByDef() no longer checks "i < PyTuple_GET_SIZE(mro)"
at the first loop iteration to optimize the most common case, when
the argument is the defining class.
V
Victor Stinner committed
760da626ff4124e1344fd8b7dbeb83b2c4b7c12c
Parent: d4aaa34
Committed by GitHub <noreply@github.com> on 4/21/2021, 10:10:16 PM