def __eq__()

in modeling/coval/arrau/markable.py [0:0]


    def __eq__(self, other):
        if isinstance(other, self.__class__):
            # MIN is only set for the key markables
            if self.MIN:
                return (self.doc_name == other.doc_name
                        and other.start >= self.start
                        and other.start <= self.MIN[0]
                        and other.end <= self.end
                        and other.end >= self.MIN[1])
            elif other.MIN:
                return (self.doc_name == other.doc_name
                        and self.start >= other.start
                        and self.start <= other.MIN[0]
                        and self.end <= other.end
                        and self.end >= other.MIN[1])
            else:
                return (self.doc_name == other.doc_name
                        and self.start == other.start
                        and self.end == other.end)
        return NotImplemented