Closed
Description
Can we add support for coroutine functions? Mainly, I'm curious how we will annotate the return type. We basically have two options:
async def foo() -> typing.Coroutine[str]:
return 'spam'
or
async def foo() -> str:
return 'spam'
I'd really prefer the latter style. While the result of 'foo()' is a Coroutine, this is something that type checkers will know without a hint, what really matters is the expected result of await foo()
expression.
Metadata
Metadata
Assignees
Labels
No labels