New submission from Yury Selivanov: Since native coroutines (see PEP 492) hadn't had a separate type when the PEP was accepted, we didn't discuss that it might be necessary to introduce new exception types specifically for coroutines.
To maintain backwards compatibility with 3.5, I think we can do the following: 1. Add CoroutineReturn exception type, inherited from StopIteration; 2. Add CoroutineExit exception type, inherited from GeneratorExit. ---------- assignee: yselivanov components: Interpreter Core messages: 247214 nosy: gvanrossum, ncoghlan, yselivanov priority: normal severity: normal status: open title: Add CoroutineReturn and CoroutineExit builtin exceptions for coroutines type: enhancement versions: Python 3.6 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue24697> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com