summaryrefslogtreecommitdiffstats
path: root/Doc/library/itertools.rst
diff options
context:
space:
mode:
authorRamil Nugmanov <nougmanoff@protonmail.com>2020-05-28 16:46:22 (GMT)
committerGitHub <noreply@github.com>2020-05-28 16:46:22 (GMT)
commitcfc6ce4d40f2f01314b7e283fb972a7bb3ed3faa (patch)
tree5eb12eb56f6b0dba63a67753bcb1fcc807bfb242 /Doc/library/itertools.rst
parent242d95659b6b4ff4fb54b58a30454dafa311d4e9 (diff)
downloadcpython-cfc6ce4d40f2f01314b7e283fb972a7bb3ed3faa.zip
cpython-cfc6ce4d40f2f01314b7e283fb972a7bb3ed3faa.tar.gz
cpython-cfc6ce4d40f2f01314b7e283fb972a7bb3ed3faa.tar.bz2
bpo-40806: Clarify that itertools.product immediately consumes its inpt (GH-20492)
Diffstat (limited to 'Doc/library/itertools.rst')
-rw-r--r--Doc/library/itertools.rst3
1 files changed, 3 insertions, 0 deletions
diff --git a/Doc/library/itertools.rst b/Doc/library/itertools.rst
index 3e5a673..3c94c4b 100644
--- a/Doc/library/itertools.rst
+++ b/Doc/library/itertools.rst
@@ -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])