summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRaymond Hettinger <python@rcn.com>2008-07-30 07:45:01 (GMT)
committerRaymond Hettinger <python@rcn.com>2008-07-30 07:45:01 (GMT)
commit2e73ffcf7bc52e439c5aa1af25e0e45fa114c135 (patch)
tree85178fad0f33c6b01b059f4ce41ffc41cbb88ed3
parentf5a2e47ad3bd5ada7d751625c208e65103116f93 (diff)
downloadcpython-2e73ffcf7bc52e439c5aa1af25e0e45fa114c135.zip
cpython-2e73ffcf7bc52e439c5aa1af25e0e45fa114c135.tar.gz
cpython-2e73ffcf7bc52e439c5aa1af25e0e45fa114c135.tar.bz2
Fix-up recipe with a syntax error (as discussed on python-dev).
-rw-r--r--Doc/library/itertools.rst3
1 files changed, 2 insertions, 1 deletions
diff --git a/Doc/library/itertools.rst b/Doc/library/itertools.rst
index 7186443..3320d99 100644
--- a/Doc/library/itertools.rst
+++ b/Doc/library/itertools.rst
@@ -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"