[issue25887] awaiting on coroutine more than once should be an error
Nick Coghlan
report at bugs.python.org
Mon Jan 11 19:35:00 EST 2016
Nick Coghlan added the comment:
The patch looks good to me, but I'd like to see the error message convey two points:
- the coroutine has already terminated (regardless of how that happened)
- the calling code attempted to resume it anyway
That is, something like "Cannot resume terminated coroutine", rather than specifically referring to "await".
After all, waiting for the result with "await" is only one way to terminate a coroutine - you can also get there with direct calls to next(), send(), throw() and close().
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue25887>
_______________________________________
More information about the Python-bugs-list
mailing list