Brendan Eich wrote:
A GeneratorFunction's body is evaluated sometime after its call
returns.
This is ill-stated. You mean a continuation of a yield in its body is
evaluated, not the whole body (re-)evaluated.
Of course, there may be no yield, or the yield may not be reached.
Yuichi pointed out similarity with return.
Sorry, now I get to be tough with myself: your "its call" threw me, my
mistake. I was thinking a call to g.next() given g = gen() for a
generator named gen. But diagramming the sentence, you mean the call
gen(), and your statement is well-stated.
/be
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss