def __lt__(self, other):
        try:
            return self.start_local <= other.start_local
        except TypeError:  # not the same type (should be datetime and date)
            if not isinstance(other.start_local, datetime):
                return 0
            elif not isinstance(self.start_local, datetime):
                return 1
            else:
                raise ValueError('Cannot compare events {} and {}'.format(self, other))
dataset/ETHPy150Open pimutils/khal/khal/khalendar/event.py/Event.__lt__/original