summaryrefslogtreecommitdiffstats
path: root/Grammar/python.gram
diff options
context:
space:
mode:
authorwim glenn <wim.glenn@gmail.com>2021-11-03 20:57:40 (GMT)
committerGitHub <noreply@github.com>2021-11-03 20:57:40 (GMT)
commit762173c6709f5cf3b59cbbe47d4e6fafbfe7ec2a (patch)
treeda8722ccb5342905a58fe533b7b767235488f0db /Grammar/python.gram
parent7b438282d39e742b2628a32e7c6699a140ff4cfb (diff)
downloadcpython-762173c6709f5cf3b59cbbe47d4e6fafbfe7ec2a.zip
cpython-762173c6709f5cf3b59cbbe47d4e6fafbfe7ec2a.tar.gz
cpython-762173c6709f5cf3b59cbbe47d4e6fafbfe7ec2a.tar.bz2
bpo-44257: fix "assigment_expr" typo + regenerate the grammar, and remove unused imports (GH-29393)
Co-authored-by: Wim Glenn <wglenn@jumptrading.com>
Diffstat (limited to 'Grammar/python.gram')
-rw-r--r--Grammar/python.gram8
1 files changed, 4 insertions, 4 deletions
diff --git a/Grammar/python.gram b/Grammar/python.gram
index 4443a5f..a8c693d 100644
--- a/Grammar/python.gram
+++ b/Grammar/python.gram
@@ -642,11 +642,11 @@ star_named_expression[expr_ty]:
| '*' a=bitwise_or { _PyAST_Starred(a, Load, EXTRA) }
| 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 !':='
@@ -903,7 +903,7 @@ setcomp[expr_ty]:
| invalid_comprehension
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
dictcomp[expr_ty]:
@@ -918,7 +918,7 @@ arguments[expr_ty] (memo):
| 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)),