variable scoping across imports?
Arthur Siegel
ajs at ix.netcom.com
Sat Dec 1 23:29:08 EST 2001
More information about the Python-list mailing list
Sat Dec 1 23:29:08 EST 2001
- Previous message (by thread): variable scoping across imports?
- Next message (by thread): variable scoping across imports?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Kragen Sitaker wrote: > Hans Nowak <wurmy at e...> writes: > > Let's see... you start x.py... x imports y... y imports x again... > > at that moment x.z0 is None. Now y has a copy of x's namespace with > > z0 == None. This is, however, not the same as the global namespace > > you're currently in. set() changes z0 to 33, but it does *not* > > affect the x module that was imported by y. > > I don't think things work this way, actually Fredick Lundh - >assuming Hans meant to write "reference to" instead >of "copy of", it does work that way. Ahem. Art
- Previous message (by thread): variable scoping across imports?
- Next message (by thread): variable scoping across imports?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list