mirror of https://github.com/python/cpython.git
Fix-up recipe with a syntax error (as discussed on python-dev).
This commit is contained in:
parent
f5a2e47ad3
commit
2e73ffcf7b
|
@ -565,7 +565,8 @@ which incur interpreter overhead.
|
||||||
def grouper(n, iterable, fillvalue=None):
|
def grouper(n, iterable, fillvalue=None):
|
||||||
"grouper(3, 'ABCDEFG', 'x') --> ABC DEF Gxx"
|
"grouper(3, 'ABCDEFG', 'x') --> ABC DEF Gxx"
|
||||||
args = [iter(iterable)] * n
|
args = [iter(iterable)] * n
|
||||||
return zip_longest(*args, fillvalue=fillvalue)
|
kwds = dict(fillvalue=fillvalue)
|
||||||
|
return zip_longest(*args, **kwds)
|
||||||
|
|
||||||
def roundrobin(*iterables):
|
def roundrobin(*iterables):
|
||||||
"roundrobin('ABC', 'D', 'EF') --> A D E B F C"
|
"roundrobin('ABC', 'D', 'EF') --> A D E B F C"
|
||||||
|
|
Loading…
Reference in New Issue