Yury Selivanov added the comment:
Attaching another patch. Please review (I plan to commit it tomorrow in 3.5
and 3.6 branches).
The patch affects generators machinery in the following way:
1. Generators behaviour isn't touched, the patch is only for 'async def'
coroutines.
2. Calling 'send()' or 'throw()' on a coroutine object after it is exhausted or
closed triggers a `RuntimeError("coroutine was already awaited")`
3. Calling 'close()' method on an exhausted or closed coroutines is a no-op.
'close()' can be called multiple times -- same as for generators.
----------
Added file: http://bugs.python.org/file41587/Issue25887_3.patch
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue25887>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com