[issue30403] PEP 547: Running extension modules using -m switch
Stefan Behnel
report at bugs.python.org
Thu Sep 7 10:31:35 EDT 2017
Stefan Behnel added the comment:
I was kinda guessing that modifying the slot list wasn't a good idea. ;)
My current use case is that I implement the "create" slot because it makes it very easy to intercept the spec and its configuration. It is not passed into "exec" as such, but I need it to initialise the module namespace with "__file__", "__path__", etc.
There is also still the idea of defining our own module type in Cython in order to have a place where we can keep C level module globals, and also to support module properties. PEP 549 will not be available in older Python versions, even if it gets accepted.
Having to choose between main-exec support and these two features seems wrong.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue30403>
_______________________________________
More information about the Python-bugs-list
mailing list