[New-bugs-announce] [issue25683] __context__ for yields inside except clause
Yury Selivanov
report at bugs.python.org
Fri Nov 20 11:29:46 EST 2015
New submission from Yury Selivanov:
In the below snippet, SubError will propagate with __context__ set to None, instead of MainError. Maybe this isn't a bug?
class MainError(Exception): pass
class SubError(Exception): pass
def main():
try:
raise MainError()
except MainError:
yield
coro = main()
coro.send(None)
coro.throw(SubError())
----------
components: Interpreter Core
messages: 254994
nosy: benjamin.peterson, gvanrossum, haypo, yselivanov
priority: normal
severity: normal
status: open
title: __context__ for yields inside except clause
type: behavior
versions: Python 3.3, Python 3.4, Python 3.5, Python 3.6
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue25683>
_______________________________________
More information about the New-bugs-announce
mailing list