]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-40806: itertools.product immediately consumes its inputs (GH-20492) (GH-20498)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Thu, 28 May 2020 16:58:33 +0000 (09:58 -0700)
committerGitHub <noreply@github.com>
Thu, 28 May 2020 16:58:33 +0000 (09:58 -0700)
Doc/library/itertools.rst

index 3e5a673898106c5005b1b83219345cc9aa08bca7..3c94c4b35dc0e514201d090d8ad64cd7be0dbfcc 100644 (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])