import x as y

Moshe Zadka moshez at math.huji.ac.il
Mon Oct 30 01:45:14 EST 2000


On Mon, 30 Oct 2000, Delaney, Timothy wrote:

> Further to this ...
> 
> import x
> y = x
> del x
> 
> *does* pollute the local namespace for a short while (if you already have x
> in the local namespace it will get rebound to the module). Does
> 
> import x as y
> 
> still pollute for that period of time, or is x *never* in the local
> namespace?

No, it's actually closer to

y = __import__("x")

--
Moshe Zadka <moshez at math.huji.ac.il> -- 95855124
http://advogato.org/person/moshez





More information about the Python-list mailing list