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

Guido van Rossum guido at python.org
Fri May 1 17:12:58 CEST 2015


On Fri, May 1, 2015 at 4:13 AM, Andrew Barnert <abarnert at yahoo.com> wrote:

> 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.


http://www.cosc.canterbury.ac.nz/greg.ewing/python/yield-from/yield_from.html

It has two small examples of *generator iterators* that can be nicely
refactored using yield-from (no need to switch to async there), but the
only meaty example using a trampoline is a scheduler for multiplexed I/O.

-- 
--Guido van Rossum (python.org/~guido)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20150501/7663ea5b/attachment.html>


More information about the Python-ideas mailing list