[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():
            raise MainError()
        except MainError:

    coro = main()

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>

More information about the New-bugs-announce mailing list