global myfunc; def myfunc():
Bruce Dodson
bruce_dodson at bigfoot.com
Wed Jul 28 23:49:56 EDT 1999
I have noticed that, when using python as an embedded language in another
program, using a temporary dictionary for a private namespace, and using
__main__'s dictionary for my global namespace, I can say:
global myfunc
def myfunc():
...
to bind myfunc into the global namespace, which allows it to persist across
calls. But I want to make sure that is "intended behavior" and not just
some implementation quirk, so I can decide whether to document that as a
feature.
Any advice?
Thanx,
Bruce
More information about the Python-list
mailing list