In article <[EMAIL PROTECTED]>,
 Ben Finney <[EMAIL PROTECTED]> wrote:

> Lou Pecora <[EMAIL PROTECTED]> writes:
> 
> > ['import mymodule' in three separate modules]
> >
> > 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?
> 
> Not quite. The module is imported three times, and is assigned to
> three different namespaces; but the code in the module is executed
> only once, the first time it is imported. Each subsequent import skips
> the "execute the code" step.

Thanks.  That's clear.

-- Lou Pecora  (my views are my own) REMOVE THIS to email me.
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to