INNER CODE UNIT · Python

__le__

althonos/pronto · pronto/entity/__init__.py:108

    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
        return NotImplemented

    def __ge__(self, other):
        if isinstance(other, Entity):
            return self.id >= other.id
        return NotImplemented

    def __hash__(self):
        return hash((self.id))

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…