def _rebuffer(self):
<EOL>results = []<EOL>exceptions = []<EOL>for i in range(self.stride):<EOL><INDENT>try:<EOL><INDENT>results.append(next(self.iterable))<EOL>exceptions.append(False)<EOL><DEDENT>except Exception as excp:<EOL><INDENT>results.append(excp)<EOL>exceptions.append(True)<EOL><DEDENT><DEDENT>res_exc = []<EOL>for rep in range(self.n):<EOL><INDENT>flat_results = []<EOL>for i in range(self.stride):<EOL><INDENT>result_list, exception = results[i], exceptions[i]<EOL>if not exception:<EOL><INDENT>flat_results.append(result_list[rep])<EOL><DEDENT>else:<EOL><INDENT>flat_results.append(result_list)<EOL><DEDENT><DEDENT>res_exc.append((flat_results, exceptions))<EOL><DEDENT>self._repeat_buffer = iter(res_exc)<EOL>
(internal) refill the repeat buffer