mirror of
https://github.com/python/cpython.git
synced 2025-12-23 09:19:18 +00:00
bpo-40806: itertools.product immediately consumes its inputs (GH-20492) (GH-20498)
This commit is contained in:
parent
eceee544de
commit
e4cc3a7c1f
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