Is this right? Multiple imports of same module.
Lou Pecora
pecora at anvil.nrl.navy.mil
Fri Mar 9 11:20:38 EST 2007
In article <1173455185.225036.167700 at 64g2000cwx.googlegroups.com>,
"Bart Ogryczak" <B.Ogryczak at gmail.com> wrote:
> On Mar 9, 3:30 pm, Lou Pecora <pec... at anvil.nrl.navy.mil> 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