[issue41756] Do not always use exceptions to return result from coroutine

Serhiy Storchaka report at bugs.python.org
Fri Sep 18 03:36:31 EDT 2020


Serhiy Storchaka <storchaka+cpython at gmail.com> added the comment:

I would be fine even with a generator-specific API as a first step, for simplicity. But the end goal is to support all generator-like objects. It is much more useful for end users and does not have drawbacks.

Enum for result seems not necessary (other functions with three-state result just return -1, 0 or 1), but if other core developers want it -- OK.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue41756>
_______________________________________


More information about the Python-bugs-list mailing list