How to use Asynchronous Comprehensions?
<p>I'm trying to use <a href="https://www.python.org/dev/peps/pep-0530/" rel="noreferrer">Python 3.6's async comprehensions</a> in a MacOS Sierra (10.12.2), but I'm receiving a <code>SyntaxError</code>.</p>

<p>Here is the code I've tried:</p>

<pre><code>print( [ i async for i in range(10) ] )
print( [ i async for i in range(10) if i &lt; 4 ] )
[i async for i in range(10) if i % 2]
</code></pre>

<p>I am receiving a syntax error for <a href="https://www.python.org/dev/peps/pep-0492/" rel="noreferrer">async loops</a>:</p>

<pre><code>result = []
async for i in aiter():
if i % 2:
    result.append(i)
</code></pre>

<p>All code is copy/paste from the PEP.</p>

<p>Terminal Output:</p>

<pre><code>&gt;&gt;&gt; print([i for i in range(10)])
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
&gt;&gt;&gt; print([i async for i in range(10)])            
  File "&lt;stdin&gt;", line 1
    print([i async for i in range(10)])
                  ^
SyntaxError: invalid syntax
&gt;&gt;&gt; print([i async for i in range(10) if i &lt; 4])
  File "&lt;stdin&gt;", line 1
    print([i async for i in range(10) if i &lt; 4])
                 ^
SyntaxError: invalid syntax
&gt;&gt;&gt; 
</code></pre>