]> granicus.if.org Git - python/commit
bpo-29942: Fix the use of recursion in itertools.chain.from_iterable. (#911)
authorT. Wouters <thomas@python.org>
Thu, 30 Mar 2017 19:48:23 +0000 (12:48 -0700)
committerGitHub <noreply@github.com>
Thu, 30 Mar 2017 19:48:23 +0000 (12:48 -0700)
commit599bb181036f724629a515317f0f39520950d51c
tree3cf9853bf9edd48a8f04b0592e59ecb34f07e26a
parent7b5b1379ac2c1e89ebf90b88b5d32457910e975e
bpo-29942: Fix the use of recursion in itertools.chain.from_iterable. (#911)

* bpo-29942: Fix the use of recursion in itertools.chain.from_iterable.

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