fix bug shows with render mass test
This commit is contained in:
parent
9a141ec2f7
commit
3abd4e89b5
@ -180,11 +180,12 @@ class Operator():
|
|||||||
ans = ' '.join([str(i) for i in ans])
|
ans = ' '.join([str(i) for i in ans])
|
||||||
return ans
|
return ans
|
||||||
|
|
||||||
def r_parenthesis(self, op, str_join=False):
|
def r_parenthesis(self, opr, str_join=False):
|
||||||
""" Add parenthesis for rigth operand if necessary """
|
""" Add parenthesis for rigth operand if necessary """
|
||||||
ans = op
|
ans = opr
|
||||||
try:
|
try:
|
||||||
if op.mainOp.priority < self.priority:
|
if opr.mainOp.priority < self.priority or \
|
||||||
|
(opr.mainOp.name == 'mul' and opr[0] == '-'):
|
||||||
ans = flatten_list(["(", ans, ")"])
|
ans = flatten_list(["(", ans, ")"])
|
||||||
except AttributeError:
|
except AttributeError:
|
||||||
# op has not the attribute priority
|
# op has not the attribute priority
|
||||||
|
Loading…
Reference in New Issue
Block a user