In article <888b5e8f-1be5-4040-bc7a-45c2e1695...@d9g2000prh.googlegroups.com>, AK Eric <warp...@sbcglobal.net> wrote: >> >> 2/ in Python, "global" really means "module-level" - there's nothing >> like a "true" global namespace. > >Isn't that __main__? > >import __main__ >__main__.foo = "asdfasdf" > >print foo ># asdfasdf
Actually, you're almost right, but it's an even WORSE idea than you thought: import __builtin__ __builtin__.foo = 'bar' Kids, do *NOT* do this at home! The reasons why are left as an exercise for the reader. ;-) -- Aahz (a...@pythoncraft.com) <*> http://www.pythoncraft.com/ "You could make Eskimos emigrate to the Sahara by vigorously arguing -- at hundreds of screens' length -- for the wonder, beauty, and utility of snow." --PNH to rb in r.a.sf.f -- http://mail.python.org/mailman/listinfo/python-list