From e4cc3a7c1f5ba9ea2c3015a5bf09cb5b93db5d47 Mon Sep 17 00:00:00 2001 From: "Miss Islington (bot)" <31488909+miss-islington@users.noreply.github.com> Date: Thu, 28 May 2020 09:58:33 -0700 Subject: bpo-40806: itertools.product immediately consumes its inputs (GH-20492) (GH-20498) --- Doc/library/itertools.rst | 3 +++ 1 file changed, 3 insertions(+) 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]) -- cgit v0.12