views:

45

answers:

1

At http://google-styleguide.googlecode.com/svn/trunk/pyguide.html#Imports, it suggests:

Even if the module is in the same package, do not directly import the module without the full package name. This might cause the package to be imported twice (with unintended side effects) when the "main" module that is used to start an application lives inside a package (and uses modules from that same package).

I don't understand what problem would be caused by importing a module from the same package without using the full package name. Can somebody give an example where this is a problem?

+2  A: 

The following provides a good explanation.

pyfunc