3 ms·
Python 3.3 fixes this with the "yield from" keyword: http://docs.python.org/3.3/whatsnew/3.3.html#pep-380 http://docs.python.org/3.3/whatsnew/3.3.html#pep-380
by pdonis 14y ago
Python 3.3 fixes this with the "yield from" keyword:
http://docs.python.org/3.3/whatsnew/3.3.html#pep-380 http://docs.python.org/3.3/whatsnew/3.3.html#pep-380
If Javascript did the same thing, you would write yield from second_sound(); in hour_sound, and then you could run hour_sound as a generator and it would Just Work.
- jlongster 14y agoES6 does the same thing with the `yield*` syntax.