from Tkinter import *
David Bolen
db3l at fitlinxx.com
Thu Mar 8 22:39:42 EST 2001
aahz at panix.com (Aahz Maruch) writes:
> Actually, I disagree with the effbot. I used to think it was okay to
> special-case "from Tkinter import *", but I've come to the conclusion
> that "import *" is _always_ a Bad Idea in any sort of production code.
> Sure it takes more work to write
While it may not apply to Tkinter, the one place I still see a use for
"import *" even in production code is large wrapped C libraries that
already name everything according to a flat namespace (for example,
staying in the GUI vein, wxPython). Everything in such a system
already has a common prefix, so there's no loss of clarity or
ambiguity, and the only negative is the insertion directly into the
local namespace, but for a wrapped external library I don't think that
is much of a negative.
I do also sometimes do it for modules designed for it (such as
threading), but that's a finer line for production code.
--
-- David
--
/-----------------------------------------------------------------------\
\ David Bolen \ E-mail: db3l at fitlinxx.com /
| FitLinxx, Inc. \ Phone: (203) 708-5192 |
/ 860 Canal Street, Stamford, CT 06902 \ Fax: (203) 316-5150 \
\-----------------------------------------------------------------------/
More information about the Python-list
mailing list