summaryrefslogtreecommitdiff
path: root/Lib/test/test_parser.py
diff options
context:
space:
mode:
authorRaymond Hettinger <python@rcn.com>2004-05-19 08:20:33 +0000
committerRaymond Hettinger <python@rcn.com>2004-05-19 08:20:33 +0000
commit354433a59dd1701985ec8463ced25a967cade3c1 (patch)
tree9e342cc53199814f81b25daabcdb85da1851bd50 /Lib/test/test_parser.py
parent285cfccecba911531b37b8a7dde45bf07d3cf9b0 (diff)
downloadcpython-git-354433a59dd1701985ec8463ced25a967cade3c1.tar.gz
SF patch #872326: Generator expression implementation
(Code contributed by Jiwon Seo.) The documentation portion of the patch is being re-worked and will be checked-in soon. Likewise, PEP 289 will be updated to reflect Guido's rationale for the design decisions on binding behavior (as described in in his patch comments and in discussions on python-dev). The test file, test_genexps.py, is written in doctest format and is meant to exercise all aspects of the the patch. Further additions are welcome from everyone. Please stress test this new feature as much as possible before the alpha release.
Diffstat (limited to 'Lib/test/test_parser.py')
-rw-r--r--Lib/test/test_parser.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/Lib/test/test_parser.py b/Lib/test/test_parser.py
index 7860e7bf83..9652f6bd1d 100644
--- a/Lib/test/test_parser.py
+++ b/Lib/test/test_parser.py
@@ -67,6 +67,8 @@ class RoundtripLegalSyntaxTestCase(unittest.TestCase):
self.check_expr("lambda foo=bar, blaz=blat+2, **z: 0")
self.check_expr("lambda foo=bar, blaz=blat+2, *y, **z: 0")
self.check_expr("lambda x, *y, **z: 0")
+ self.check_expr("(x for x in range(10))")
+ self.check_expr("foo(x for x in range(10))")
def test_print(self):
self.check_suite("print")