Title: 2to3 fails to parse async generators in non-async functions
Type: behavior Stage: patch review
Components: 2to3 (2.x to 3.x conversion tool) Versions: Python 3.8, Python 3.7
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: benjamin.peterson, lukasz.langa, yselivanov, zsol
Priority: normal Keywords: patch

Created on 2018-04-24 13:02 by zsol, last changed 2018-04-24 14:55 by zsol.

Pull Requests
URL Status Linked Edit
PR 6588 open zsol, 2018-04-24 14:55
Messages (1)
msg315700 - (view) Author: Zsolt Dollenstein (zsol) * Date: 2018-04-24 13:02
This is valid since python3.7:

def f():
    return (i * 2 async for i in arange(42))

but lib2to3 doesn't parse this properly, because `async` is tokenized as a `NAME` instead of `ASYNC`
Date User Action Args
2018-04-24 14:55:18zsolsetkeywords: + patch
stage: patch review
pull_requests: + pull_request6288
2018-04-24 13:20:27serhiy.storchakasetnosy: + benjamin.peterson, lukasz.langa, yselivanov
2018-04-24 13:02:45zsolcreate