State of generators?

Juan Ignacio Dopazo dopazo.juan at gmail.com
Sat Jun 8 13:42:52 PDT 2013


Hello,

I'm having trouble understanding the current status of generators. Last
time I checked, the standard was what V8 has just implemented:

- Generator objects had next(), send(), throw() and close() methods
- These methods returned objects with "value" and "done" properties

It seems now that:
- send() and close() are gone
- next(value) seems to be the same as send(value)
- All methods seem to return the yielded result, not an object with a
"value" property

So, is StopIteration back? How do we know if a generator is done?

Thanks,
Juan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20130608/252c3e57/attachment.html>


More information about the es-discuss mailing list