]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-40806: Clarify that itertools.product immediately consumes its inpt (GH-20492)
authorRamil Nugmanov <nougmanoff@protonmail.com>
Thu, 28 May 2020 16:46:22 +0000 (19:46 +0300)
committerGitHub <noreply@github.com>
Thu, 28 May 2020 16:46:22 +0000 (09:46 -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])