[issue12475] Generator bug allows you to chain arbitrary tracebacks to the next raised exception
Devin Jeanpierre
report at bugs.python.org
Sun Jul 3 09:07:44 CEST 2011
New submission from Devin Jeanpierre <jeanpierreda at gmail.com>:
It's probably best shown by example:
http://ideone.com/4YkqV
Have fun! This one looks hard.
Some notes: Exchanging g2() for iter([1]) makes this go away. Wrapping g2 inside a non-generator iterator does not make this go away.
Removing the call to next(it) after it = g2() makes the problem go away, as does replacing those two lines with next(g2()).
The file used in that ideone paste is attached for your convenience.
---
Debugging is impractical for me with this bug in existence. It never stopped printing the traceback before I killed the process. (And let's forget about debug prints!)
----------
components: Interpreter Core
files: exception_chaining.py
messages: 139670
nosy: Devin Jeanpierre
priority: normal
severity: normal
status: open
title: Generator bug allows you to chain arbitrary tracebacks to the next raised exception
type: behavior
versions: Python 3.1, Python 3.2
Added file: http://bugs.python.org/file22550/exception_chaining.py
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue12475>
_______________________________________
More information about the Python-bugs-list
mailing list