summaryrefslogtreecommitdiffstats
path: root/Tools/compiler/astgen.py
diff options
context:
space:
mode:
Diffstat (limited to 'Tools/compiler/astgen.py')
-rw-r--r--Tools/compiler/astgen.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/Tools/compiler/astgen.py b/Tools/compiler/astgen.py
index 9386bf0..c0eb464 100644
--- a/Tools/compiler/astgen.py
+++ b/Tools/compiler/astgen.py
@@ -81,6 +81,8 @@ class NodeInfo:
print >> buf, " def __repr__(self):"
if self.argnames:
fmt = COMMA.join(["%s"] * self.nargs)
+ if '(' in self.args:
+ fmt = '(%s)' % fmt
vals = ["repr(self.%s)" % name for name in self.argnames]
vals = COMMA.join(vals)
if self.nargs == 1: