[issue29446] Improve tkinter 'import *' situation
Terry J. Reedy
report at bugs.python.org
Sat Feb 4 20:14:25 EST 2017
Terry J. Reedy added the comment:
This issue is spun-off from #29162, which was about idlelib.pyshell depending on import * importing sys.
'wantobjects' does not have the same bug potential as stdlib imports. But, Serhiy, if you care about it or otherwise prefer __all__,
__all__ = [name for name in globals() if not name.startswith('_') and name not in {'enum', 're', 'sys', 'wantobjects'}]
should work if placed near the end of the file, just before 'def _test'. Except for the exclusion set, I presume that 'import *' does essentially the same iteration
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue29446>
_______________________________________
More information about the Python-bugs-list
mailing list