mirror of
https://github.com/python/cpython.git
synced 2025-10-12 09:53:19 +00:00
parent
24ea8d3d9c
commit
954aed8c8d
2 changed files with 11 additions and 0 deletions
|
@ -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
|
||||||
|
|
|
@ -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)()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue