From
Modules doc
Quote:Note that in general the practice of importing * from a module or package is frowned upon,
since it often causes poorly readable code
.
However, it is okay to use it to save typing in interactive sessions.
Namespace pollution,and where dos stuff comes from
Risk of overriding variables/functions etc.
Example:
from math import *
def foo(arg):
return trunc(arg) + arg
>>> foo(3.5)
6.5
Think if you see
trunc(arg)
in line 250,and don't know that it's a math method.
Look at import and see
from math import *
that dos not help at all.
Better:
from math import trunc
def foo(arg):
return trunc(arg) + arg