Add test for eval() w/ free variables.

Related to SF bug #505315
This commit is contained in:
Jeremy Hylton 2002-04-20 04:51:39 +00:00
parent 24ea8d3d9c
commit 954aed8c8d
2 changed files with 11 additions and 0 deletions

View file

@ -21,3 +21,4 @@ test_scope
20. interaction with trace function 20. interaction with trace function
20. eval and exec with free variables 20. eval and exec with free variables
21. list comprehension with local variables 21. list comprehension with local variables
22. eval with free variables

View file

@ -512,3 +512,13 @@ try:
print bad print bad
except NameError: except NameError:
pass pass
print "22. eval with free variables"
def f(x):
def g():
x
eval("x + 1")
return g
f(4)()