Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 2e73ffc

Browse files
committed
Fix-up recipe with a syntax error (as discussed on python-dev).
1 parent f5a2e47 commit 2e73ffc

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

Doc/library/itertools.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -565,7 +565,8 @@ which incur interpreter overhead.
565565
def grouper(n, iterable, fillvalue=None):
566566
"grouper(3, 'ABCDEFG', 'x') --> ABC DEF Gxx"
567567
args = [iter(iterable)] * n
568-
return zip_longest(*args, fillvalue=fillvalue)
568+
kwds = dict(fillvalue=fillvalue)
569+
return zip_longest(*args, **kwds)
569570
570571
def roundrobin(*iterables):
571572
"roundrobin('ABC', 'D', 'EF') --> A D E B F C"

0 commit comments

Comments
 (0)