Implementation of the global statement

Hung Jung Lu hungjunglu at yahoo.com
Wed Nov 27 08:26:33 EST 2002


The global statement as in

def f(x):
    global y
    ...

is a directive to the parser. Internally the parser must keep a list
of the "locally-globalled" names. Yes, you guessed right, out of pure
curiosity: is this list accessible from Python? If not, why not? :)

Hung Jung



More information about the Python-list mailing list