def __iter__(self):
    return self

def __next__(self):
    if self.start == self.end:
        raise StopIteration()
r = self.seq[self.start]
itertools.islice implementation -- efficiently slicing a list