[Python-checkins] CVS: python/dist/src/Lib/test test_scope.py,1.20,1.21

Jeremy Hylton jhylton@users.sourceforge.net
Thu, 18 Oct 2001 09:23:13 -0700


Update of /cvsroot/python/python/dist/src/Lib/test
In directory usw-pr-cvs1:/tmp/cvs-serv7057

Modified Files:
	test_scope.py 
Log Message:
Add test for local assigned to only in a nested list comp


Index: test_scope.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_scope.py,v
retrieving revision 1.20
retrieving revision 1.21
diff -C2 -d -r1.20 -r1.21
*** test_scope.py	2001/09/25 19:29:35	1.20
--- test_scope.py	2001/10/18 16:23:11	1.21
***************
*** 486,487 ****
--- 486,505 ----
  
  warnings.resetwarnings()
+ 
+ print "21. list comprehension with local variables"
+ 
+ try:
+     print bad
+ except NameError:
+     pass
+ else:
+     print "bad should not be defined"
+ 
+ def x():
+     [bad for s in 'a b' for bad in s.split()]
+ 
+ x()
+ try:
+     print bad
+ except NameError:
+     pass