[Python-checkins] python/dist/src/Lib/test test_genexps.py, 1.7, 1.7.2.1

nnorwitz@users.sourceforge.net nnorwitz at users.sourceforge.net
Sun Oct 23 02:44:06 CEST 2005


Update of /cvsroot/python/python/dist/src/Lib/test
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24884/Lib/test

Modified Files:
      Tag: release24-maint
	test_genexps.py 
Log Message:
Backport: SF bug #1167751: fix incorrect code being for generator expressions.

Index: test_genexps.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_genexps.py,v
retrieving revision 1.7
retrieving revision 1.7.2.1
diff -u -d -r1.7 -r1.7.2.1
--- test_genexps.py	30 Sep 2004 22:29:03 -0000	1.7
+++ test_genexps.py	23 Oct 2005 00:44:03 -0000	1.7.2.1
@@ -82,6 +82,18 @@
        ...
     SyntaxError: invalid syntax
 
+Verify that parenthesis are required when used as a keyword argument value
+
+    >>> dict(a = i for i in xrange(10))
+    Traceback (most recent call last):
+       ...
+    SyntaxError: invalid syntax
+
+Verify that parenthesis are required when used as a keyword argument value
+
+    >>> dict(a = (i for i in xrange(10))) #doctest: +ELLIPSIS
+    {'a': <generator object at ...>}
+
 Verify early binding for the outermost for-expression
 
     >>> x=10



More information about the Python-checkins mailing list