[Python-ideas] More general "for" loop handling

Paul Moore p.f.moore at gmail.com
Thu Apr 30 19:54:50 CEST 2015


On 30 April 2015 at 18:31, Guido van Rossum <guido at python.org> wrote:
> PEP 492 is only meant to make code easier to read and write that's already
> written to use coroutines (e.g. using the asyncio library, but not limited
> to that).

OK, that's fair. To an outsider like me it feels like a lot of new
syntax to support a very specific use case. But that's because I don't
really have a feel for what you mean when you note "but not limited to
that". Are there any good examples or use cases for coroutines that
are *not* asyncio-based? And assuming you are saying that PEP 482
should help for those as well, could it include a non-asyncio example?
My immediate reaction is that the keywords "async" and "await" will
seem a little odd in a non-asyncio context.

Paul

Paul


More information about the Python-ideas mailing list