[Python-checkins] python/dist/src/Tools/compiler ast.txt,1.4,1.5

rhettinger at users.sourceforge.net rhettinger at users.sourceforge.net
Wed May 19 04:20:35 EDT 2004


Update of /cvsroot/python/python/dist/src/Tools/compiler
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9770/Tools/compiler

Modified Files:
	ast.txt 
Log Message:
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.



Index: ast.txt
===================================================================
RCS file: /cvsroot/python/python/dist/src/Tools/compiler/ast.txt,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** ast.txt	14 Sep 2001 22:40:36 -0000	1.4
--- ast.txt	19 May 2004 08:20:33 -0000	1.5
***************
*** 39,42 ****
--- 39,46 ----
  ListCompFor: assign, list, ifs!
  ListCompIf: test
+ GenExpr: code 
+ GenExprInner: expr, quals!
+ GenExprFor: assign, iter, ifs!
+ GenExprIf: test
  List: nodes!
  Dict: items!
***************
*** 86,87 ****
--- 90,98 ----
      if flags & CO_VARKEYWORDS:
          self.kwargs = 1
+ 
+ init(GenExpr):
+     self.argnames = ['[outmost-iterable]']
+     self.varargs = self.kwargs = None
+ 
+ init(GenExprFor):
+     self.is_outmost = False




More information about the Python-checkins mailing list