

def __getitem__(self, key):
    if isinstance(key, slice):
        (start, stop, step) = (key.start, key.stop, key.step)
        if (step != None):
            raise IndexError('SQL backend dos not support steps in slices')
        if (key.start == None):
            start = 0
        if (key.stop == None):
            stop = len(self)
        if (start < 0):
            start = (len(self) + start)
        if (stop < 0):
            stop = (len(self) + stop)
        qs = copy.copy(self)
        if start:
            qs.offset(start)
        qs.limit((stop - start))
        qs.objects = None
        qs.count = None
        return qs
    if (self.deserialized_objects is None):
        self.get_deserialized_objects()
    return self.deserialized_objects[key]

dataset/ETHPy150Open adewes/blitzdb/blitzdb/backends/sql/queryset.py QuerySet.__getitem__/original