commit | ab427b8ccedacf94acdc0149fc8fb24f8c58c272 | [log] [tgz] |
---|---|---|
author | Jeremy Hylton <jeremy@alum.mit.edu> | Sat Aug 18 00:14:37 2001 +0000 |
committer | Jeremy Hylton <jeremy@alum.mit.edu> | Sat Aug 18 00:14:37 2001 +0000 |
tree | 34d58e081f96a0db82ca42805ee30147bfb2bd65 | |
parent | ec5bfd13cada33ed36f93fd76b1355ce9ee2710f [diff] [blame] |
Generate correct reprs for Mul, Add, etc.
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 @@ 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: