]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
bpo-29942: Fix the use of recursion in itertools.chain.from_iterable. (#913)
authorT. Wouters <thomas@python.org>
Thu, 30 Mar 2017 19:49:22 +0000 (12:49 -0700)
committerGitHub <noreply@github.com>
Thu, 30 Mar 2017 19:49:22 +0000 (12:49 -0700)
commitd694a06206fc09b76b4507aacde5e69a248f434f
tree2a9f3f2ff87b55f01160205b6f8f3239146c35dc
parent079f21f873b99f9564a41c5b7f3e0d7035847ae5
bpo-29942: Fix the use of recursion in itertools.chain.from_iterable. (#913)

Fix the use of recursion in itertools.chain.from_iterable. Using recursion
is unnecessary, and can easily cause stack overflows, especially when
building in low optimization modes or with Py_DEBUG enabled.
(cherry picked from commit 5466d4af5fe76ec0a5fbc8a05675287d9e8e9d14)
Lib/test/test_itertools.py
Misc/NEWS
Modules/itertoolsmodule.c