How do coroutines in Python compare to those in Lua? : <p>Support for coroutines in Lua is provided by <a href="https://www.lua.org/manual/5.3/manual.html#2.6" rel="noreferrer">functions in the <code>coroutine</code> table</a>, primarily <code>create</code>, <code>resume</code> and <code>yield</code>. The developers describe these coroutines as <a href="http://laser.inf.ethz.ch/2012/slides/Ierusalimschy/coroutines-4.pdf" rel="noreferrer">stackful, first-class and asymmetric</a>.</p>

<p>Coroutines are also available in Python, either using <a href="https://www.python.org/dev/peps/pep-0342/" rel="noreferrer">enhanced generators</a> (and <a href="https://www.python.org/dev/peps/pep-0380/" rel="noreferrer"><code>yield from</code></a>) or, added in version 3.5, <a href="https://www.python.org/dev/peps/pep-0492/" rel="noreferrer"><code>async</code> and <code>await</code></a>.</p>

<p>How do coroutines in Python compare to those in Lua? Are they also stackful, first-class and asymmetric?</p>

<p>Why does Python require so many constructs (<code>async def</code>, <code>async with</code>, <code>async for</code>, <a href="https://www.python.org/dev/peps/pep-0530/" rel="noreferrer">asynchronous comprehensions</a>, ...) for coroutines, while Lua can provide them with just three built-in functions?</p>
