State of generators?

Brian Di Palma offler at gmail.com
Sat Jun 8 15:34:27 PDT 2013


I don't know what version of V8 you are using but I'm using them in
unstable Node.js so V8 is v3.19.
The StopIteration is gone and they do return an object with the
"value" property.

I think Chrome 29 would be the browser version you should be testing with.

On Sat, Jun 8, 2013 at 9:42 PM, Juan Ignacio Dopazo
<dopazo.juan at gmail.com> wrote:
> 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
>
> _______________________________________________
> es-discuss mailing list
> es-discuss at mozilla.org
> https://mail.mozilla.org/listinfo/es-discuss
>


More information about the es-discuss mailing list