Kaydet (Commit) d75ad44a authored tarafından Raymond Hettinger's avatar Raymond Hettinger

Fix-up doc for itertools.repeat(). A -1 translates to zero repetitions, not…

Fix-up doc for itertools.repeat().  A -1 translates to zero repetitions, not infinite repetitions.  This matches the behavior of ['x']*n.
üst 1ae35ea1
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment