bpo-43797: Handle correctly invalid assignments inside function calls and generators (GH-25390)

This commit is contained in:
Pablo Galindo 2021-04-13 17:51:21 +01:00 committed by GitHub
parent fd79af7ae2
commit 30ed93bfec
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 21 additions and 9 deletions

View file

@ -638,7 +638,7 @@ group[expr_ty]:
| '(' a=(yield_expr | named_expression) ')' { a }
| invalid_group
genexp[expr_ty]:
| '(' a=named_expression b=for_if_clauses ')' { _PyAST_GeneratorExp(a, b, EXTRA) }
| '(' a=direct_named_expression b=for_if_clauses ')' { _PyAST_GeneratorExp(a, b, EXTRA) }
| invalid_comprehension
set[expr_ty]: '{' a=star_named_expressions '}' { _PyAST_Set(a, EXTRA) }
setcomp[expr_ty]: