diff options
Diffstat (limited to 'Grammar/python.gram')
-rw-r--r-- | Grammar/python.gram | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Grammar/python.gram b/Grammar/python.gram index 0dff08c..783f23f 100644 --- a/Grammar/python.gram +++ b/Grammar/python.gram @@ -515,7 +515,9 @@ star_named_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) } + | a=NAME ':=' ~ b=expression { + CHECK_VERSION(expr_ty, 8, "Assignment expressions are", + _PyAST_NamedExpr(CHECK(expr_ty, _PyPegen_set_expr_context(p, a, Store)), b, EXTRA)) } named_expression[expr_ty]: | assignment_expression |