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

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