Armin Rigo <ar...@users.sourceforge.net> added the comment:

The issue is a stack exhaustion.  Examples can be trivially made for any 
iterator that takes another iterator as argument: itertools.takewhile(), zip() 
in Python3, etc. etc.

It's just one of many places where CPython does a recursion without checking 
the recursion depth.  CPython still works, based on the resonable assumption 
that doing such a recursion here is obscure.

Someone seriously bored could start with some C-based callgraph builder; or 
alternatively use PyPy, which finds such recursions automatically in its own 
source, and compare all places where a recursion check is inserted with the 
corresponding place in CPython.  There are a large number of them (761, not 
counting the JIT), so be patient :-(

----------
nosy: +arigo

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue14010>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to