and why?
Sometimes I need import all the attributes of a module so I use wildcard importing, but one of my Vim scripts(using flake8 as its syntax checker) always giv
It's generally not a good idea to use from module import *
. Wildcard importing leads to namespace pollution; you imported more names than you need and if you accidentally refer to an imported name you may not get the NameError you wanted.
Also, if a future version of the library added additional names, you could end up masking other names, leading to stranger bugs still:
from foo import bar
from spam import *
If you upgrade spam
and it now includes a spam.bar
it'll replace the foo.bar
import in the line above.