[Python-3000-checkins] r65298 - python/branches/py3k/Doc/library/itertools.rst

raymond.hettinger python-3000-checkins at python.org
Wed Jul 30 09:45:01 CEST 2008


Author: raymond.hettinger
Date: Wed Jul 30 09:45:01 2008
New Revision: 65298

Log:
Fix-up recipe with a syntax error (as discussed on python-dev).

Modified:
   python/branches/py3k/Doc/library/itertools.rst

Modified: python/branches/py3k/Doc/library/itertools.rst
==============================================================================
--- python/branches/py3k/Doc/library/itertools.rst	(original)
+++ python/branches/py3k/Doc/library/itertools.rst	Wed Jul 30 09:45:01 2008
@@ -565,7 +565,8 @@
    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"


More information about the Python-3000-checkins mailing list