We deliberated long and hard, after going through a design state without
return expr;, on this. We agree with
http://www.python.org/dev/peps/pep-0380/
Adam Ahmed wrote:
Hi all,
Long-time lurker, first-time poster. Profuse apologies if this was
mentioned before and I failed to find it.
I've been using V8's generator implementation in Node 0.11.x recently,
and have come across what I believe is a footgun with generators
currently. That is - the ability to return a value, not just yield a
value. I am proposing that while `return;` is still allowed, `return
value;` becomes a syntax error within generators.
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss