5 Jan
2022
5 Jan
'22
6:49 p.m.
On Wed, Jan 5, 2022 at 9:32 AM Petr Viktorin <encukou@gmail.com> wrote:
Since it was has optimized (thanks, Victor!), I haven't seen complaints about performance issues. Sadly, it has a loop so it's much slower than using C statics, but it's OK for many use cases.
Just to be clear, it loops over the type's MRO. So typically it won't involve more than one or two iterations.
So, I'd like to drop the leading underscore, and add PyType_GetModuleByDef directly to the limited API.
[snip]
Is anyone against? Does anyone feel this should be discussed more widely than on capi-sig?
Seems good to me. It seems useful right now and this API doesn't prevent us from finding a more efficient solution.
-eric