mirror of
https://github.com/python/cpython.git
synced 2024-11-24 10:24:35 +08:00
parent
24ea8d3d9c
commit
954aed8c8d
@ -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)()
|
||||
|
Loading…
Reference in New Issue
Block a user