Fix-up doc for itertools.repeat(). A -1 translates to zero repetitions, not infinite repetitions. This matches the behavior of ['x']*n.

This commit is contained in:
Raymond Hettinger 2009-06-01 19:16:52 +00:00
parent 1ae35ea1d6
commit d75ad44aed
1 changed files with 1 additions and 1 deletions

View File

@ -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