mirror of
https://github.com/python/cpython.git
synced 2025-07-24 11:44:31 +00:00
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
1 changed files with 1 additions and 1 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue