]> granicus.if.org Git - python/commit
bpo-29942: Fix the use of recursion in itertools.chain.from_iterable. (#889)
authorT. Wouters <thomas@python.org>
Thu, 30 Mar 2017 16:58:35 +0000 (09:58 -0700)
committerGitHub <noreply@github.com>
Thu, 30 Mar 2017 16:58:35 +0000 (09:58 -0700)
commit5466d4af5fe76ec0a5fbc8a05675287d9e8e9d14
tree598a42e56dd2ef8cee216d4bf92118e5304bb642
parent06e522521c06671b4559eecf9e2a185c2d62c141
bpo-29942: Fix the use of recursion in itertools.chain.from_iterable. (#889)

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.
Lib/test/test_itertools.py
Misc/NEWS
Modules/itertoolsmodule.c