[Python-ideas] More general "for" loop handling
Andrew Barnert
abarnert at yahoo.com
Fri May 1 13:13:41 CEST 2015
On Apr 30, 2015, at 10:54, Paul Moore <p.f.moore at gmail.com> wrote:
>
>> 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?
IIRC, the original asyncio PEP has links to Greg Ewing's posts that demonstrated how you could use yield from coroutines for various purposes, including asynchronous I/O, but also things like many-actor simulations, with pretty detailed examples.
> 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
> _______________________________________________
> Python-ideas mailing list
> Python-ideas at python.org
> https://mail.python.org/mailman/listinfo/python-ideas
> Code of Conduct: http://python.org/psf/codeofconduct/
More information about the Python-ideas
mailing list