[New-bugs-announce] [issue24697] Add CoroutineReturn and CoroutineExit builtin exceptions for coroutines

Yury Selivanov report at bugs.python.org
Thu Jul 23 17:10:15 CEST 2015


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 <report at bugs.python.org>
<http://bugs.python.org/issue24697>
_______________________________________


More information about the New-bugs-announce mailing list