Open GoogleCodeExporter opened 9 years ago
Occurs because __next__ on empty list immediately throws a StopIteration
exception
Can be fixed by:
def __next__(self):
try:
value = next(self.__iterable)
if self.start_time is None: self.start()
else: self.update(self.currval + 1)
return value
except StopIteration:
if self.start_time is None: self.start() # !!! this line added
self.finish()
raise
Original comment by taras...@gmail.com
on 28 May 2014 at 1:54
Original issue reported on code.google.com by
timothy....@gmail.com
on 13 Apr 2014 at 11:41