[Python-checkins] [python/cpython] d694a0: bpo-29942: Fix the use of recursion in itertools.c...

GitHub noreply at github.com
Thu Mar 30 15:49:23 EDT 2017


  Branch: refs/heads/2.7
  Home:   https://github.com/python/cpython
  Commit: d694a06206fc09b76b4507aacde5e69a248f434f
      https://github.com/python/cpython/commit/d694a06206fc09b76b4507aacde5e69a248f434f
  Author: T. Wouters <thomas at python.org>
  Date:   2017-03-30 (Thu, 30 Mar 2017)

  Changed paths:
    M Lib/test/test_itertools.py
    M Misc/NEWS
    M Modules/itertoolsmodule.c

  Log Message:
  -----------
  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)




More information about the Python-checkins mailing list