You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Reason through Future, Generator, Coroutine, Awaitable #1140
This came up in #1137 (comment). We should eventually know exactly how to declare the type of various coroutine-like things, whether they use @asyncio.coroutine, async def, or merely yield from.
I think Future and Coroutine are owned by the asyncio stubs. The relationship and meaning of Generator and Iterator seems to have been sorted out. Support for yield from appears solid. We also have Awaitable, AsyncIterable and AsyncIterator in typing.py.
What remains IMO is support for async def and await (and async for, async with). For the return type of async def, see the discussion in the typing tracker.
Activity
gvanrossum commentedon Apr 29, 2016
I think
FutureandCoroutineare owned by theasynciostubs. The relationship and meaning ofGeneratorandIteratorseems to have been sorted out. Support foryield fromappears solid. We also haveAwaitable,AsyncIterableandAsyncIteratorin typing.py.What remains IMO is support for
async defandawait(andasync for,async with). For the return type ofasync def, see the discussion in the typing tracker.gvanrossum commentedon Apr 29, 2016
Closing in favor of #1453.