LWN.net Logo

A proposal for "rebooted" Python asynchronous I/O support

A proposal for "rebooted" Python asynchronous I/O support

Posted Jan 6, 2013 2:35 UTC (Sun) by tack (subscriber, #12542)
In reply to: A proposal for "rebooted" Python asynchronous I/O support by smurf
Parent article: A proposal for "rebooted" Python asynchronous I/O support

In which framework were you tasked with debugging a maze of yield froms?

This is very different from the callback world of Twisted. The code reads fairly linearly like it would with gevent, except that your exit/entry points are explicit rather than implicit.

Having coded with both approaches (that is, explicit yields vs. greenlet-style implicitness) I prefer to be explicit. I rather like the visual cue that signals where my function will suspend and resume and I find this improves debuggability rather than hinders it. IMO, yielding gives you a nice bit of async magic while not violating the principle of least astonishment.


(Log in to post comments)

Copyright © 2013, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds