mirror of
https://github.com/python/cpython.git
synced 2025-08-03 08:34:29 +00:00
bpo-42374: Allow unparenthesized walrus in genexps (GH-23319)
This fixes a regression that was introduced by the new parser. Automerge-Triggered-By: GH:lysnikolaou
This commit is contained in:
parent
f62dad16b8
commit
cb3e5ed071
4 changed files with 18 additions and 7 deletions
|
@ -517,7 +517,7 @@ group[expr_ty]:
|
|||
| '(' a=(yield_expr | named_expression) ')' { a }
|
||||
| invalid_group
|
||||
genexp[expr_ty]:
|
||||
| '(' a=expression ~ b=for_if_clauses ')' { _Py_GeneratorExp(a, b, EXTRA) }
|
||||
| '(' a=named_expression ~ b=for_if_clauses ')' { _Py_GeneratorExp(a, b, EXTRA) }
|
||||
| invalid_comprehension
|
||||
set[expr_ty]: '{' a=expressions_list '}' { _Py_Set(a, EXTRA) }
|
||||
setcomp[expr_ty]:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue