1.1 --- a/compiler/ast.py Sun Jun 30 22:42:16 2013 +0200
1.2 +++ b/compiler/ast.py Wed Oct 09 01:28:02 2013 +0200
1.3 @@ -74,6 +74,7 @@
1.4 "Annotation-related node."
1.5
1.6 def __init__(self):
1.7 + self.unit = None
1.8
1.9 # Name and usage observations.
1.10
1.11 @@ -543,7 +544,12 @@
1.12 return tuple(nodelist)
1.13
1.14 def __repr__(self):
1.15 - return "CallFunc(%r, %r, %r, %r)" % (self.node, self.args, self.star_args, self.dstar_args)
1.16 + args = []
1.17 + if self.dstar_args:
1.18 + args.insert(0, repr(self.dstar_args))
1.19 + if args or self.star_args:
1.20 + args.insert(0, repr(self.star_args))
1.21 + return "CallFunc(%r, %r%s)" % (self.node, self.args, args and (", %s" % ", ".join(args)) or "")
1.22
1.23 def __str__(self):
1.24 star_args = self.star_args and ["*%s" % self.star_args] or []
1.25 @@ -563,10 +569,6 @@
1.26 self.decorators = decorators
1.27 self.lineno = lineno
1.28
1.29 - # Additional annotations.
1.30 -
1.31 - self.unit = None
1.32 -
1.33 def getChildren(self):
1.34 children = []
1.35 children.append(self.name)
1.36 @@ -916,10 +918,6 @@
1.37 if flags & CO_VARKEYWORDS:
1.38 self.kwargs = 1
1.39
1.40 - # Additional annotations.
1.41 -
1.42 - self.unit = None
1.43 -
1.44 def getChildren(self):
1.45 children = []
1.46 children.append(self.decorators)
1.47 @@ -1487,10 +1485,6 @@
1.48 self.node = node
1.49 self.lineno = lineno
1.50
1.51 - # Additional annotations.
1.52 -
1.53 - self.unit = None
1.54 -
1.55 def getChildren(self):
1.56 return self.doc, self.node
1.57