def expr(self):
"""
Process the term, by returning a sympy expression
"""
if DEBUG:
print("> Term ")
ret = self.op[0].expr
for operation, operand in zip(self.op[1::2], self.op[2::2]):
if operation == '*':
ret = Mul(ret, operand.expr)
else:
a = Pow(operand.expr, -1)
ret = Mul(ret, a)
return ret
评论列表
文章目录