summaryrefslogtreecommitdiffstats
path: root/Doc/library
diff options
context:
space:
mode:
authorRaymond Hettinger <python@rcn.com>2009-06-01 19:16:52 (GMT)
committerRaymond Hettinger <python@rcn.com>2009-06-01 19:16:52 (GMT)
commitd75ad44aed87865925adbd15930a9aef5901f7c8 (patch)
treeb01ebfea519bc73113d4dc6da04ad120bc362682 /Doc/library
parent1ae35ea1d613ed6e01cbca20f08342393cadb663 (diff)
downloadcpython-d75ad44aed87865925adbd15930a9aef5901f7c8.zip
cpython-d75ad44aed87865925adbd15930a9aef5901f7c8.tar.gz
cpython-d75ad44aed87865925adbd15930a9aef5901f7c8.tar.bz2
Fix-up doc for itertools.repeat(). A -1 translates to zero repetitions, not infinite repetitions. This matches the behavior of ['x']*n.
Diffstat (limited to 'Doc/library')
-rw-r--r--Doc/library/itertools.rst2
1 files changed, 1 insertions, 1 deletions
diff --git a/Doc/library/itertools.rst b/Doc/library/itertools.rst
index e6a9fe2..7baa5e1 100644
--- a/Doc/library/itertools.rst
+++ b/Doc/library/itertools.rst
@@ -459,7 +459,7 @@ loops that truncate the stream.
yield tuple(prod)
-.. function:: repeat(object, times=-1)
+.. function:: repeat(object[, times])
Make an iterator that returns *object* over and over again. Runs indefinitely
unless the *times* argument is specified. Used as argument to :func:`map` for