LWN.net Logo

PyCon: Evangelizing Python

PyCon: Evangelizing Python

Posted Apr 6, 2013 19:42 UTC (Sat) by chrisV (subscriber, #43417)
Parent article: PyCon: Evangelizing Python

"But generators have a problem: they are a "bad date". Like a date that can only talk about themselves, generators can only talk, not listen. That led to the idea of two-way generators. Now generators can accept inputs in the form of send(), throw(), and close() methods. It is a feature that is unique to Python"

Except that it isn't. This has been available in spidermonkey's ECMAscript implementation for ages (since 1.7?). Any language which provides delimited continuations can implement this, which includes GNU guile's scheme implementation (where I have working code which does this), and no doubt most of the other functional languages can do something similar.


(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