bpo-40806: Clarify that itertools.product immediately consumes its inpt (GH-20492)
This commit is contained in:
parent
242d95659b
commit
cfc6ce4d40
|
@ -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…
Reference in New Issue