

def next(self):
    if (self._idx < self.qrw._ct):
        obj = self.qrw._result_cache[self._idx]
    elif (not self.qrw._populated):
        obj = self.qrw.iterate()
        self.qrw._result_cache.append(obj)
        self.qrw._ct += 1
    else:
        raise StopIteration
    obj._idx += 1
    return obj

dataset/ETHPy150Open coleifer/peewee/peewee.py ResultIterator.next/VarMisuse@89/111 `self`->`obj`