[Python-checkins] CVS: python/dist/src/Tools/compiler/compiler ast.py,1.17,1.18
Jeremy Hylton
jhylton@users.sourceforge.net
Mon, 17 Sep 2001 13:17:04 -0700
Update of /cvsroot/python/python/dist/src/Tools/compiler/compiler
In directory usw-pr-cvs1:/tmp/cvs-serv3614
Modified Files:
ast.py
Log Message:
Re-created after change to astgen to calculate hardest_arg correctly
Index: ast.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Tools/compiler/compiler/ast.py,v
retrieving revision 1.17
retrieving revision 1.18
diff -C2 -d -r1.17 -r1.18
*** ast.py 2001/09/14 22:40:36 1.17
--- ast.py 2001/09/17 20:17:02 1.18
***************
*** 49,192 ****
pass
! class If(Node):
! nodes["if"] = "If"
! def __init__(self, tests, else_):
! self.tests = tests
! self.else_ = else_
def getChildren(self):
children = []
[...2163 lines suppressed...]
! self.ifs = ifs
def getChildren(self):
children = []
! children.append(self.assign)
! children.append(self.list)
! children.extend(flatten(self.ifs))
return tuple(children)
def getChildNodes(self):
nodes = []
! nodes.append(self.assign)
! nodes.append(self.list)
! nodes.extend(flatten_nodes(self.ifs))
return tuple(nodes)
def __repr__(self):
! return "ListCompFor(%s, %s, %s)" % (repr(self.assign), repr(self.list), repr(self.ifs))
klasses = globals()