Files
openide/python/testData/highlighting/asyncComprehensionsPy35.py
T
Semyon Proshev 464ade6789 PY-20770 Fixed: Support Python 3.6 asynchronous generators and comprehensions
Update CompatibilityVisitor to highlight "async" inside comprehensions and generator expressions in Pythons < 3.6
2016-09-30 18:06:02 +03:00

16 lines
1.5 KiB
Python

async def asyncgen():
<error descr="Python version 3.5 does not support 'yield' inside async functions">yield 10</error>
async def run():
{i <error descr="Python version 3.5 does not support 'async' inside comprehensions and generator expressions">async</error> for i in asyncgen()}
[i <error descr="Python version 3.5 does not support 'async' inside comprehensions and generator expressions">async</error> for i in asyncgen()]
{i: i ** 2 <error descr="Python version 3.5 does not support 'async' inside comprehensions and generator expressions">async</error> for i in asyncgen()}
(i ** 2 <error descr="Python version 3.5 does not support 'async' inside comprehensions and generator expressions">async</error> for i in asyncgen())
list(i <error descr="Python version 3.5 does not support 'async' inside comprehensions and generator expressions">async</error> for i in asyncgen())
dataset = {data for line in gen()
<error descr="Python version 3.5 does not support 'async' inside comprehensions and generator expressions">async</error> for data in line
if check(data)}
dataset = {data <error descr="Python version 3.5 does not support 'async' inside comprehensions and generator expressions">async</error> for line in asyncgen()
<error descr="Python version 3.5 does not support 'async' inside comprehensions and generator expressions">async</error> for data in line
if check(data)}