Steven D'Aprano wrote:
> The interpreter should infer that a plain `def` function is actually
an `async def` from the presence of `async yield`, similar to the way
the interpreter infers that a plain `def` function is actually a
generator from the presence of a `yield`.
I would have to strongly disagree with this part of the author's proposal especially. The whole purpose of the `async def` declaration was to help ensure that a normal subroutine function was not mistakenly used as a coroutine. Allowing the interpreter to infer that a regularly declared function is actually a subroutine would ultimately go against this intention by making the distinction between subroutines and coroutines far less explicit.
Steven D'Aprano wrote:
>
What if you're not using asyncio, but some other framework?
This point is also especially important. The "async/await" syntax was meant to essentially be its own separate API of sorts, to allow for the usage of entirely distinct async frameworks such as curio.
Asyncio is dependent on the "async/await" syntax, but not the other way around.
I'm not certain that I understand how these changes could be applied without causing compatibility issues.