Andrew Svetlov <andrew.svet...@gmail.com> added the comment:
> Are you suggesting that I need to just inherit from Awaitable? Yes. Awaitable is a very base protocol, Coroutine is an implementation. `__await__` returns a generator that is used by Python internals as if `yield from awaitable.__await__()` was called. asyncio never sends data back to the generator but other async frameworks can do it. `send()`/`close()`/`throw()` coroutine methods are never used now IFAIK. The current implementation calls these methods at the C level without using Python-exposed names. Performance matters. These methods can be still used in very rare cases, e.g. when explicit Python `yield from custom_coro.__await__()` is used. ---------- components: +Interpreter Core -asyncio _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue46818> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com