[Python-Dev] Need advice, maybe support (original) (raw)
Thomas Heller theller@python.net
23 May 2003 17:31:06 +0200
- Previous message: [Python-Dev] Need advice, maybe support
- Next message: [Python-Dev] Need advice, maybe support
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
> > The other is the new style where the PyMethodDef > > array is in tpmethods, and is scanned once by PyTypeReady. > > 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 PyTypeReady 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
- Previous message: [Python-Dev] Need advice, maybe support
- Next message: [Python-Dev] Need advice, maybe support
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]