O'Reilly logo
  • Parminder Sohal thinks this is interesting:

The import statement simply adds the package to the search path when hunting for names. So no true dependency is created by such imports, and they therefore serve to keep our modules less coupled.


Cover of Clean Code


reading python oo we learned using import something.* is never a good idea. because you never know what the heck you are importing in your namespace. you can get classes imported you do not what.

Even worse suppose you did import a. and import b. now both a and b can be having some compute() function. you don't know which was is being called at times now.

Not just that but you can get other unexpected behaviors also because of this. modern editors like eclipse can collapse all the imports and do a check if the import is valid or not.