Hello, Extension modules have a new "md_state" member, I understand that it is designed to hold the "static" state of the module. IIUC, for example in _cpickle.c, the "PyObject *dispatch_table" variable is a good candidate for such module state. This would allow to play more nicely with multiple startups/shutdowns, reloading of the module, or with different sub-interpreters.
This state is accessible through the PyModule_GetState() function. This is fine for module functions (the module object is passed as the first argument, even if we always name it "self"), but how does it work with classes or class methods? Classes do not contain a reference to their modules, they only have access to the __name__, which is not the same thing at all, specially in this case. This is unfortunate for extension modules which try to be object-oriented, and have very few functions (the _pickle module does not have any BTW) How is this supposed to work? -- Amaury Forgeot d'Arc _______________________________________________ Python-3000 mailing list Python-3000@python.org http://mail.python.org/mailman/listinfo/python-3000 Unsubscribe: http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com