[issue4040] ignored exceptions in generators (regression?)

Benjamin Peterson report at bugs.python.org
Sat Oct 4 17:21:29 CEST 2008


New submission from Benjamin Peterson <musiccomposition at gmail.com>:

Given this code:

def f():
    for i in f():
        yield i

for i in f(): print i

2.6 gives:
Exception RuntimeError: 'maximum recursion depth exceeded in
__subclasscheck__' in <type 'exceptions.RuntimeError'> ignored
Exception RuntimeError: 'maximum recursion depth exceeded while calling
a Python object' in <type 'exceptions.RuntimeError'> ignored
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
...
  File "<stdin>", line 2, in f
RuntimeError: maximum recursion depth exceeded

2.5 and 3.0 do not have this problem.

----------
messages: 74314
nosy: benjamin.peterson
priority: high
severity: normal
status: open
title: ignored exceptions in generators (regression?)
versions: Python 2.6, Python 2.7

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue4040>
_______________________________________


More information about the Python-bugs-list mailing list