[Python-Dev] PEP 3000 and exec

Sokolov Yura falcon at intercable.ru
Tue Oct 11 08:33:43 CEST 2005


Agree.
 >>>i=1
 >>>def a():
    i=2
    def b():
        print i
    return b
    
 >>>a()()
2
 >>>def a():
    i=2
    def b():
        exec "print i"
    return b
    
 >>>a()()
1



More information about the Python-Dev mailing list