def __eq__(self, other): if type(other) == Ex: if self.expr is not None and self.expr.calc == "reeval": return self.expr == other return PClass.__eq__(self, other)