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:
parent
1ae35ea1d6
commit
d75ad44aed
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue