[Python-checkins] python/dist/src/Lib/test test_scope.py,1.25,1.26
jhylton@sourceforge.net
jhylton@sourceforge.net
Fri, 19 Apr 2002 21:51:38 -0700
Update of /cvsroot/python/python/dist/src/Lib/test
In directory usw-pr-cvs1:/tmp/cvs-serv31718
Modified Files:
test_scope.py
Log Message:
Add test for eval() w/ free variables.
Related to SF bug #505315
Index: test_scope.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_scope.py,v
retrieving revision 1.25
retrieving revision 1.26
diff -C2 -d -r1.25 -r1.26
*** test_scope.py 3 Mar 2002 15:12:58 -0000 1.25
--- test_scope.py 20 Apr 2002 04:51:36 -0000 1.26
***************
*** 513,514 ****
--- 513,524 ----
except NameError:
pass
+
+ print "22. eval with free variables"
+
+ def f(x):
+ def g():
+ x
+ eval("x + 1")
+ return g
+
+ f(4)()