> > > The other is the new style where the PyMethodDef > > > array is in tp_methods, and is scanned once by PyType_Ready. > > > > Right, again. Now, under the hopeful assumption that every > > sensible extension module that has some types to publish also > > does this through its module dictionary, I would have the > > opportunity to cause PyType_Ready being called early enough > > to modify the method table, before any of its methods is used > > at all. > > Dangerous assumption! It's not inconceivable that a class would > instantiate some of its own classes as part of its module > initialization. I do not really know what you are talking about here, but that assumption is violated by the ctypes module. It has a number of metaclasses implemented in C, neither of them is exposed in the module dictionary, and there *have been* types which were not exposed, because they are only used internally. Thomas
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4