Skip to content
Snippets Groups Projects
Commit d6923218 authored by Thibault Debatty's avatar Thibault Debatty
Browse files

fix doctest

parent 44574c1f
No related branches found
No related tags found
No related merge requests found
Pipeline #10377 passed
......@@ -88,7 +88,8 @@ def batched(iterable, count):
'''
if count < 1:
raise ValueError('n must be at least one')
while (batch := tuple(islice(iter(iterable), count))):
iterable = iter(iterable)
while (batch := tuple(islice(iterable, count))):
yield batch
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment