summaryrefslogtreecommitdiffstats
path: root/Doc/library
diff options
context:
space:
mode:
authorRaymond Hettinger <python@rcn.com>2012-07-08 23:04:03 (GMT)
committerRaymond Hettinger <python@rcn.com>2012-07-08 23:04:03 (GMT)
commit9ae947338911a73070254f1999f42d4bf3713ec4 (patch)
tree9554847a1f29daabd45b3c69952873a6e39da477 /Doc/library
parent86a20f834ab4066950ef3688af00c08543ffb1b1 (diff)
downloadcpython-9ae947338911a73070254f1999f42d4bf3713ec4.zip
cpython-9ae947338911a73070254f1999f42d4bf3713ec4.tar.gz
cpython-9ae947338911a73070254f1999f42d4bf3713ec4.tar.bz2
Make it easier to search for the grouper() recipe.
Diffstat (limited to 'Doc/library')
-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 994a25a..da3e690 100644
--- a/Doc/library/itertools.rst
+++ b/Doc/library/itertools.rst
@@ -705,7 +705,8 @@ which incur interpreter overhead.
return zip(a, b)
def grouper(n, iterable, fillvalue=None):
- "grouper(3, 'ABCDEFG', 'x') --> ABC DEF Gxx"
+ "Collect data into fixed-length chunks or blocks"
+ # grouper(3, 'ABCDEFG', 'x') --> ABC DEF Gxx"
args = [iter(iterable)] * n
return zip_longest(*args, fillvalue=fillvalue)