Is this right? Multiple imports of same module.

Lou Pecora pecora at
Fri Mar 9 17:20:38 CET 2007

In article <1173455185.225036.167700 at>,
 "Bart Ogryczak" <B.Ogryczak at> wrote:

> 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.

Praise the Lord.  :-)  I got one right in the namespaces puzzles. (But 
see my followup on using  'from XXX import *' in this thread.  I'm still 
not a namespace guru.

> > 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.

Good to know.  Thank you.

-- Lou Pecora  (my views are my own) REMOVE THIS to email me.

More information about the Python-list mailing list