Toplevel "test()" functions in standard library
Rob W. W. Hooft
rob at hooft.net
Wed Jul 19 06:08:51 EDT 2000
>>>>> "PS" == Peter Schneider-Kamp <peter at schneider-kamp.de> writes:
PS> I cannot comment on the reason for this idiom, but for your name
PS> space pollution using "from ... import *": Don't use it.
I don't. But some still do.
PS> <rant>Even in the short time I have been on the list I have seen
PS> examples of nearly untrackable bugs because of name space
PS> collisions when using "from ... import *".</rant>
I am all in favor of solving this kind of problems 2 ways:
- Discourage use of from ... import * even more than now
- Make use that there is as little pollution as possible
PS> I don't even use "from Tkinter import *" in GUI apps.
Same here. I don't even rename it. The repeated Tkinter.TOP and
Tkinter.YES are a bit annoying, but it makes the code quite clear.
Rob
--
===== rob at hooft.net http://www.hooft.net/people/rob/ =====
===== R&D, Nonius BV, Delft http://www.nonius.nl/ =====
===== PGPid 0xFA19277D ========================== Use Linux! =========
More information about the Python-list
mailing list