Author: Antonio Cuni <[email protected]>
Branch: py3k
Changeset: r51869:116575861a5d
Date: 2012-01-27 11:21 +0100
http://bitbucket.org/pypy/pypy/changeset/116575861a5d/

Log:    kill a lot of snippets from the invalid cases: in python3 it is now
        possible to call exec() inside a function which creates nested
        functions with free variables, because exec() cannot modify the
        locals anyway

diff --git a/pypy/interpreter/test/test_syntax.py 
b/pypy/interpreter/test/test_syntax.py
--- a/pypy/interpreter/test/test_syntax.py
+++ b/pypy/interpreter/test/test_syntax.py
@@ -76,51 +76,6 @@
         from x import *
 
     def f():
-        def g():
-            exec("hi")
-            x
-    # NB. the above one is invalid in CPython, but there is no real reason
-
-    def f(x):
-        def g():
-            exec("hi")
-            x
-
-    def f():
-        exec("hi")
-        def g():
-            x
-
-    def f():
-        exec("hi")
-        lambda x: y
-
-    def f():
-        exec("hi")
-        class g:
-            x
-
-    def f():
-        exec("hi")
-        x = 5
-        class g:
-            def h():
-                x
-
-    def f(x):
-        exec("hi")
-        x = 4
-        class g:
-            x
-
-    def f(x):
-        exec("hi")
-        x = 5
-        class g:
-            def h():
-                x
-
-    def f():
         (i for i in x) = 10
 
 """)
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to