- if expr.func in funcmap:
- args = [Domain.fromsympy(arg) for arg in expr.args]
- return funcmap[expr.func](*args)
- elif isinstance(expr, sympy.Expr):
- return LinExpr.fromsympy(expr)
- raise ValueError('non-domain expression: {!r}'.format(expr))
+ if expression.func in funcmap:
+ args = [Domain.fromsympy(arg) for arg in expression.args]
+ return funcmap[expression.func](*args)
+ elif isinstance(expression, sympy.Expr):
+ return LinExpr.fromsympy(expression)
+ raise ValueError('non-domain expression: {!r}'.format(expression))