class MADATA: def __init__( self, a: int, b: int, c: int, ): self.a = a self.b = b self.c = c @property def _tup_view(self): return self.a, self.b, self.c def __hash__(self): return hash(self._tup_view) def __eq__(self, o): return isinstance(o, type(self)) and o._tup_view == self._tup_view