mirror of
https://github.com/python/cpython.git
synced 2025-07-24 19:54:21 +00:00
[3.10] bpo-44257: fix "assigment_expr" typo + regenerate the grammar, and remove unused imports (GH-29393) (GH-29395)
Co-authored-by: Wim Glenn <wglenn@jumptrading.com>.
(cherry picked from commit 762173c670
)
Co-authored-by: wim glenn <wim.glenn@gmail.com>
This commit is contained in:
parent
1f3ae5c1ca
commit
0e34a5918c
2 changed files with 64 additions and 64 deletions
|
@ -512,11 +512,11 @@ star_named_expression[expr_ty]:
|
|||
| named_expression
|
||||
|
||||
|
||||
assigment_expression[expr_ty]:
|
||||
assignment_expression[expr_ty]:
|
||||
| a=NAME ':=' ~ b=expression { _PyAST_NamedExpr(CHECK(expr_ty, _PyPegen_set_expr_context(p, a, Store)), b, EXTRA) }
|
||||
|
||||
named_expression[expr_ty]:
|
||||
| assigment_expression
|
||||
| assignment_expression
|
||||
| invalid_named_expression
|
||||
| expression !':='
|
||||
|
||||
|
@ -708,7 +708,7 @@ group[expr_ty]:
|
|||
| '(' a=(yield_expr | named_expression) ')' { a }
|
||||
| invalid_group
|
||||
genexp[expr_ty]:
|
||||
| '(' a=( assigment_expression | expression !':=') b=for_if_clauses ')' { _PyAST_GeneratorExp(a, b, EXTRA) }
|
||||
| '(' a=( assignment_expression | 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]:
|
||||
|
@ -747,7 +747,7 @@ arguments[expr_ty] (memo):
|
|||
| a=args [','] &')' { a }
|
||||
| invalid_arguments
|
||||
args[expr_ty]:
|
||||
| a[asdl_expr_seq*]=','.(starred_expression | ( assigment_expression | expression !':=') !'=')+ b=[',' k=kwargs {k}] {
|
||||
| a[asdl_expr_seq*]=','.(starred_expression | ( assignment_expression | expression !':=') !'=')+ b=[',' k=kwargs {k}] {
|
||||
_PyPegen_collect_call_seqs(p, a, b, EXTRA) }
|
||||
| a=kwargs { _PyAST_Call(_PyPegen_dummy_name(p),
|
||||
CHECK_NULL_ALLOWED(asdl_expr_seq*, _PyPegen_seq_extract_starred_exprs(p, a)),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue