Merge pull request #17873 from github/tausbn/python-fix-generator-expression-locations

Python: Even more parser fixes
This commit is contained in:
Taus
2024-11-01 12:47:19 +01:00
committed by GitHub
11 changed files with 48516 additions and 47821 deletions

View File

@@ -0,0 +1,8 @@
async def foo():
await bar() + await baz()
async with foo() as bar, baz() as quux:
pass
async for spam in eggs:
pass

View File

@@ -35,3 +35,5 @@ t, u,
x, y,
#comment
)
((z,))

View File

@@ -65,3 +65,10 @@ t = tuple(x for y in z)
d for e in f if g # comment
# comment
] # comment
# Generator expression with comments
(# comment
alpha # comment
for beta in gamma # comment
# comment
)

View File

@@ -77,3 +77,12 @@ if 34:
b'\xc5\xe5'
if 35:
f"{x=}"
if 36:
r"a\"a"
if 37:
r'a\'a'
if 38:
r'a\\'
if 39:
r'a\
'