4 ms·
Hmm, It is a SyntaxError to have yield or yield from expressions in an async function. That's what I mean when I say it misses the mark. There are now two
by dkarapetyan 11y ago
Hmm,
It is a SyntaxError to have yield or yield from expressions in an async function.
That's what I mean when I say it misses the mark. There are now two ways of doing the same thing and one of them is more powerful than the other. Using generators I can use both `yield` and `yield from` but if I use what they're calling co-routines then I can only use `yield from`. I see no value in the new syntax.
So an async function is not really a co-routine. It is a regular function that gets to use `await` and that's it. Calling it a co-routine is misleading and confusing.