fix display bug for nary op

This commit is contained in:
Marcell Vazquez-Chanlatte 2016-10-06 14:41:17 -07:00
parent a414e57162
commit fbd7cc0564

2
ast.py
View file

@ -47,7 +47,7 @@ class NaryOpSTL(namedtuple('NaryOp', ['args'])):
if n == 1:
return "{}".format(self.args[0])
elif self.args:
rep = " {op} ".join(["({})"]*(len(self.args) - 1))
rep = " {op} ".join(["({})"]*(len(self.args)))
return rep.format(*self.args, op=self.OP)
else:
return ""