2 ms·
> What I mind is having to do "async def", "async for", "async with" all over the place for no good reason. IMO `async for` and `async with` are misnomers - th
by pansa2 6y ago
> What I mind is having to do "async def", "async for", "async with" all over the place for no good reason.
IMO `async for` and `async with` are misnomers - they are statements that call asynchronous functions (`__anext__`, `__aenter__` and `__aexit__`) so would have been better named something like `for await` and `with await`.
`async def`, on the other hand, was just copied cargo-cult-style from C#. I don't think it's necessarily bad, but you're right to say that it's inconsistent with Python's existing generators.