[Python-Dev] statically nested scopes

Skip Montanaro skip@mojam.com (Skip Montanaro)
Wed, 1 Nov 2000 15:57:17 -0600 (CST)


    MAL> [pre-PEP] This will break code...

    Jeremy> How will this break code?

Suppose you have

    x = 1
    def f1():
        x = 2
        def inner():
            print x
        inner()

Today, calling f1() prints "1".  After your proposed changes I suspect it
would print "2".

Skip