def next(self):
        if self.tried is not None:
            raise Exception("no feedback received on last value generated")
        while True:
            self.tried = self.data[:] # make a copy
            try:
                rmd = self.tried.pop(self.i)
                if len(rmd) == 1 and rmd[0] == "\n":
                    self.keep(True)
                    continue # skip newlines
                return self.formatter(sum(self.tried, []))
            except __HOLE__:
                self.tried = None
                if not self.data or (len(self.data[0]) == 1 and not self.found_something):
                    raise StopIteration
                else:
                    self._reset()
dataset/ETHPy150Open blackberry/ALF/alf/reduce.py/FeedbackIter.next