[Python-checkins] python/dist/src/Lib/compiler ast.py, 1.22, 1.23 pycodegen.py, 1.66, 1.67 symbols.py, 1.13, 1.14 transformer.py, 1.38, 1.39 (original) (raw)

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


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

Modified Files: ast.py pycodegen.py symbols.py transformer.py 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.py

RCS file: /cvsroot/python/python/dist/src/Lib/compiler/ast.py,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** ast.py 11 Aug 2003 16:20:39 -0000 1.22 --- ast.py 19 May 2004 08:20:06 -0000 1.23


*** 1237,1240 **** --- 1237,1316 ---- return "ListCompFor(%s, %s, %s)" % (repr(self.assign), repr(self.list), repr(self.ifs))

Index: pycodegen.py

RCS file: /cvsroot/python/python/dist/src/Lib/compiler/pycodegen.py,v retrieving revision 1.66 retrieving revision 1.67 diff -C2 -d -r1.66 -r1.67 *** pycodegen.py 21 Mar 2004 15🔞50 -0000 1.66 --- pycodegen.py 19 May 2004 08:20:07 -0000 1.67


*** 620,623 **** --- 620,696 ---- self.emit('POP_TOP')


*** 1200,1203 **** --- 1273,1277 ---- else: name = func.name

+ args, hasTupleArg = generateArgList(func.argnames) self.graph = pyassem.PyFlowGraph(name, func.filename, args,


*** 1264,1267 **** --- 1338,1356 ---- self.graph.setFlag(CO_GENERATOR)

Index: symbols.py

RCS file: /cvsroot/python/python/dist/src/Lib/compiler/symbols.py,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** symbols.py 28 Aug 2003 02:09:26 -0000 1.13 --- symbols.py 19 May 2004 08:20:08 -0000 1.14


*** 180,183 **** --- 180,198 ---- pass


*** 221,224 **** --- 236,265 ---- self.handle_free_vars(scope, parent)

Index: transformer.py

RCS file: /cvsroot/python/python/dist/src/Lib/compiler/transformer.py,v retrieving revision 1.38 retrieving revision 1.39 diff -C2 -d -r1.38 -r1.39 *** transformer.py 6 Apr 2003 09:00:45 -0000 1.38 --- transformer.py 19 May 2004 08:20:08 -0000 1.39


*** 535,538 **** --- 535,544 ---- exprlist = testlist


*** 1086,1089 **** --- 1092,1137 ---- return List(values)


*** 1123,1126 **** --- 1171,1176 ---- break kw, result = self.com_argument(node, kw)


*** 1149,1152 **** --- 1199,1205 ----

  def com_argument(self, nodelist, kw):


More information about the Python-checkins mailing list