def __contains__(self, item):
        if self._cache_complete:
            return item in self._cache
        else:
            for i in self:
                if i == item:
                    return True
                elif i > item:
                    return False
        return False

    # __len__() introduces a large performance penality.
dataset/ETHPy150Open CouchPotato/CouchPotatoV1/library/dateutil/rrule.py/rrulebase.__contains__/original