[issue20383] Add a keyword-only spec argument to types.ModuleType

Nick Coghlan report at bugs.python.org
Sun Apr 6 12:26:53 CEST 2014


Nick Coghlan added the comment:

No, the attribute level arguments won't go away - __name__ deliberately differs from __spec__.name in some cases (notably in __main__), __path__ may be manipulated after the module is loaded, and __name and __file__ are both used too heavily within module code for it to be worth the hassle of deprecating them in favour of something else.

I think Brett's push to simplify things as much as possible is good though - that's the main brake on creeping API complexity in the overall import system as we try to make the internals easier to comprehend and manipulate.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue20383>
_______________________________________


More information about the Python-bugs-list mailing list