python - "Unused wild import": Why? -


whenever import module using asterisk (from <anymodule> import *) fined "unused wild import"-warning. appears if not right way import, why syntax exist if shouldn't using it?

that message tells you importing features module don't need, means should import need. shuld use from foobar import x, y x , y elements need.

the syntax from foobar import * more useful in command-line interpreter when don't want think or type many more characters little benefit. in real project, should not use syntax since if use it, not clear feature module going use.


Comments