I guess the reason is that it changes the type of the return value. Compare:
def moo():
return 5
async def oink():
return 5
moo returns 5, oink returns an awaitable.
For a human, without the 'async' marker, you'd have to scan the entire function source to know. I guess also type checkers and documentation tools like to have an idea about the return type.
For a human, without the 'async' marker, you'd have to scan the entire function source to know. I guess also type checkers and documentation tools like to have an idea about the return type.