Re: [Python-Dev] Implementing an awaitable

2018-11-07 Thread Justin Turner Arthur
Thanks for the thorough rundown, Nathaniel. I started to get an idea of the required shape only by looking at CPython code like you suggest. I wanted to create an awaitable compatible with asyncio and trio that could be awaited more than once unlike a coroutine, and not runner-specific like a

Re: [Python-Dev] Implementing an awaitable

2018-11-07 Thread Nathaniel Smith
"Awaitable" is a language-level concept. To actually use awaitables, you also need a coroutine runner library, and each library defines additional restrictions on the awaitables it works with. So e.g. when using asyncio as your coroutine runner, asyncio expects your awaitables to follow particular