From: Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> Date: Thu, 28 May 2020 16:58:33 +0000 (-0700) Subject: bpo-40806: itertools.product immediately consumes its inputs (GH-20492) (GH-20498) X-Git-Tag: v3.9.0b2~58 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e4cc3a7c1f5ba9ea2c3015a5bf09cb5b93db5d47;p=thirdparty%2FPython%2Fcpython.git bpo-40806: itertools.product immediately consumes its inputs (GH-20492) (GH-20498) --- diff --git a/Doc/library/itertools.rst b/Doc/library/itertools.rst index 3e5a67389810..3c94c4b35dc0 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])