def __eq__(self, other):
return self.metric1 == other.metric1 andself.operator == other.operator andself.metric2 == other.metric2<EOL>
Note that this tests for *equality* not *equivalence*, eg
        m + (m + m) != (m + m) + m, though the two expressions are equivalent.