Peter Otten wrote:
Hm, what about
with NameSpace(globals()) as a:
x = "inside a!"
def function():
print(x)
with NameSpace(globals()) as b:
x = "inside b!"
def function():
print(x)
x = "inside main!"
a.function()
b.function()
It would have to be `a.x = ...` and `b.x = ...` with corresponding
`print(a.x)` and `print(b.x)`.
Hrm -- and functions/classes/etc would have to refer to each other that
way as well inside the namespace... not sure I'm in love with that...
~Ethan~
--
http://mail.python.org/mailman/listinfo/python-list