Commit ed423287 authored by Jeremy Hylton's avatar Jeremy Hylton

Add test for eval() w/ free variables.

Related to SF bug #505315
parent eeb5506b
......@@ -21,3 +21,4 @@ test_scope
20. interaction with trace function
20. eval and exec with free variables
21. list comprehension with local variables
22. eval with free variables
......@@ -512,3 +512,13 @@ try:
print bad
except NameError:
pass
print "22. eval with free variables"
def f(x):
def g():
x
eval("x + 1")
return g
f(4)()
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment