INADA Naoki added the comment: There is special internal API in dictobject.c _PyDict_LoadGlobal(PyDictObject *globals, PyDictObject *builtins, PyObject *key)
Maybe, we can have special API like that _PyDict_LookupMro(PyObject *mro, PyObject *key); BTW, method cache in _PyType_Lookup is not good for initializing type. It always mishit. And all specialized method is cached even if it isn't used anymore. Stefan, would you benchmark these ideas? ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue31336> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com