mirror of https://github.com/python/cpython
Minor stylistic edit to the grouper recipe (gh112759)
This commit is contained in:
parent
11d88a178b
commit
c2e2df8356
|
@ -916,9 +916,9 @@ which incur interpreter overhead.
|
||||||
args = [iter(iterable)] * n
|
args = [iter(iterable)] * n
|
||||||
if incomplete == 'fill':
|
if incomplete == 'fill':
|
||||||
return zip_longest(*args, fillvalue=fillvalue)
|
return zip_longest(*args, fillvalue=fillvalue)
|
||||||
if incomplete == 'strict':
|
elif incomplete == 'strict':
|
||||||
return zip(*args, strict=True)
|
return zip(*args, strict=True)
|
||||||
if incomplete == 'ignore':
|
elif incomplete == 'ignore':
|
||||||
return zip(*args)
|
return zip(*args)
|
||||||
else:
|
else:
|
||||||
raise ValueError('Expected fill, strict, or ignore')
|
raise ValueError('Expected fill, strict, or ignore')
|
||||||
|
|
Loading…
Reference in New Issue