Wildcard imports are import statements in the form
from <module_name> import *. What imports like these do is that they import everything  from the module into the current module's namespace . This allows you to use names defined in the imported module without prefixing the module's name.
This is discouraged, for various reasons:
>>> from math import * >>> sin(pi / 2) 1.0
- Potential namespace collision. Names defined from a previous import might get shadowed by a wildcard import. - Causes ambiguity. From the example, it is unclear which
>>> from custom_sin import sin >>> from math import * >>> sin(pi / 2) # uses sin from math rather than your custom sin
sinfunction is actually being used. From the Zen of Python :
Explicit is better than implicit.- Makes import order significant, which they shouldn't. Certain IDE's
sort importfunctionality may end up breaking code due to namespace collision.
How should you import?
- Import the module under the module's namespace (Only import the name of the module, and names defined in the module can be used by prefixing the module's name)
>>> import math >>> math.sin(math.pi / 2)
- Explicitly import certain names from the module
Conclusion: Namespaces are one honking great idea -- let's do more of those! 
>>> from math import sin, pi >>> sin(pi / 2)
 If the module defines the variable
__all__, the names defined in
__all__ will get imported by the wildcard import, otherwise all the names in the module get imported (except for names with a leading underscore)
 Namespaces and scopes
 Zen of Python