]> granicus.if.org Git - python/commitdiff
Fix-up recipe with a syntax error (as discussed on python-dev).
authorRaymond Hettinger <python@rcn.com>
Wed, 30 Jul 2008 07:45:01 +0000 (07:45 +0000)
committerRaymond Hettinger <python@rcn.com>
Wed, 30 Jul 2008 07:45:01 +0000 (07:45 +0000)
Doc/library/itertools.rst

index 71864439a23094c2505d5f542dc7de7ea47c8770..3320d992ee4318eaa3ec69313693f602b4db2b8d 100644 (file)
@@ -565,7 +565,8 @@ which incur interpreter overhead.
    def grouper(n, iterable, fillvalue=None):
        "grouper(3, 'ABCDEFG', 'x') --> ABC DEF Gxx"
        args = [iter(iterable)] * n
-       return zip_longest(*args, fillvalue=fillvalue)
+       kwds = dict(fillvalue=fillvalue)
+       return zip_longest(*args, **kwds)
 
    def roundrobin(*iterables):
        "roundrobin('ABC', 'D', 'EF') --> A D E B F C"