mirror of
https://github.com/python/cpython.git
synced 2026-01-04 14:32:21 +00:00
bpo-40806: Clarify that itertools.product immediately consumes its inpt (GH-20492)
This commit is contained in:
parent
242d95659b
commit
cfc6ce4d40
1 changed files with 3 additions and 0 deletions
|
|
@ -563,6 +563,9 @@ loops that truncate the stream.
|
|||
for prod in result:
|
||||
yield tuple(prod)
|
||||
|
||||
Before :func:`product` runs, it completely consumes the input iterables,
|
||||
keeping pools of values in memory to generate the products. Accordingly,
|
||||
it only useful with finite inputs.
|
||||
|
||||
.. function:: repeat(object[, times])
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue