Terry J. Reedy added the comment:

I agree that depending on the incidental import is a bug.  Tkinter could 
change, or I might change 'from tkinter import *' to 'from tkinter import Tk, 
...' or 'import tkinter as tk'.

Serhiy, tkinter/__init__.py imports enum, sys, and re under their own names, so 
that * imports incidentally import them into other programs.  I believe it is 
customary for library modules to underscore stdlib imports to prevent this: 
"import enum as _enum", etc.  But I don't remember is this is in the devguide.  
Do you think we should make the change to tkinter?

----------
nosy: +serhiy.storchaka
resolution:  -> fixed
stage: needs patch -> resolved
status: open -> closed

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue29162>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to