PEP 227 (was Re: Nested scopes resolution -- you can breathe again!)

Jeremy Hylton jeremy at alum.mit.edu
Thu Mar 1 12:04:31 EST 2001


Or: global NAME in FUNCTION

def eggs():
    z = 2
    def spam():
        def inner():
            global x in spam, z in eggs
            x += 1
            z += x
        x = 23
        inner()

Jeremy




More information about the Python-list mailing list