Andrew Svetlov 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. a
Kristiyan Kanchev added the comment:
Hello Andrew,
I'm sorry for using the bug tracker, but I wasn't sure whether posting on
StackOverflow (is this the appropriate Q&A site?) will attract the attention of
the right people.
Although I see you marked this as Closed, I'll be very pleased if y
Andrew Svetlov added the comment:
You don't need send()/throw()/close() methods.
aiohttp had them to work with Python 3.5
P.S. Please don't use the bug tracker as Q&A site.
--
resolution: -> not a bug
stage: -> resolved
status: open -> closed
___
New submission from Kristiyan :
Hello,
Last several days I'm trying to implement an async "opener" object that can be
used as Coroutine as well as an AsyncContextManager (eg. work with `await
obj.open()` and `async with obj.open()`). I've researched several
implementations from various pytho