bpo-40806: itertools.product immediately consumes its inputs (GH-20492) (GH-20498)

This commit is contained in:
Miss Islington (bot) 2020-05-28 09:58:33 -07:00 committed by GitHub
parent eceee544de
commit e4cc3a7c1f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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])