Wildcard imports in Python: Why from module import * is a bad idea

Wildcard imports in Python: Why from module import * is a bad idea

Using many names from a Python module? Import them all:

from MODNAME import *

Wait: This is usually a TERRIBLE idea!

• Potential namespace collisions
• Less readable code
• Module upgrades affect globals in your program

I know, it’s tempting — but don’t!