diff --git a/pymath/calculus/operator/operator.py b/pymath/calculus/operator/operator.py index 5dd6897..8c8bd75 100644 --- a/pymath/calculus/operator/operator.py +++ b/pymath/calculus/operator/operator.py @@ -209,7 +209,10 @@ class Operator(): def __eq__(self, op2): """ op1 == op2 """ - return self.name == op2.name and self.arity == op2.arity + try: + return self.name == op2.name and self.arity == op2.arity + except AttributeError: + return False def save_mainOp(obj, mainOp): """Create a temporary class build over built-in type to stock the main operation of a calculus