INNER CODE UNIT · Python
__eq__
althonos/pronto · pronto/entity/__init__.py:98
def __eq__(self, other: Any) -> bool:
if isinstance(other, Entity):
return self.id == other.id
return False
def __lt__(self, other):
if isinstance(other, Entity):
return self.id < other.id
return NotImplemented
def __le__(self, other):
if isinstance(other, Entity):
return self.id <= other.id
return NotImplemented
def __gt__(self, other):
if isinstance(other, Entity):
return self.id > other.id