We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b77bfbc commit 491e552Copy full SHA for 491e552
1 file changed
row_processor.py
@@ -32,5 +32,7 @@ def batch(iterable, size):
32
sourceiter = iter(iterable)
33
while True:
34
batchiter = islice(sourceiter, size)
35
- yield chain([six.next(batchiter)], batchiter)
36
-
+ try:
+ yield chain([six.next(batchiter)], batchiter)
37
+ except StopIteration:
38
+ return
0 commit comments