raymond.hettinger
2008-07-30 07:45:01 UTC
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"
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"