Is this right? Multiple imports of same module.

Bart Ogryczak B.Ogryczak at
Fri Mar 9 16:46:25 CET 2007

On Mar 9, 3:30 pm, Lou Pecora <pec... at> wrote:
> Then mymodule is imported only once, but each module has access to it
> through the module name (mod1 and mod2) and the alias MM (mod3).  Is
> that right?

Yes, it is.

> I was concerned about multiple imports and efficiency.

If the module is already loaded, it won't be loaded again. Dictionary
of loaded modules is avaliable as sys.modules.

More information about the Python-list mailing list