mirror of
https://github.com/python/cpython.git
synced 2025-11-02 11:08:57 +00:00
gh-94947: Disallow parsing walrus with feature_version < (3, 8) (#94948)
* gh-94947: Disallow parsing walrus with feature_version < (3, 8) * oops, commit the parser * 📜🤖 Added by blurb_it. Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
This commit is contained in:
parent
97b4121f93
commit
ae0be5a53b
4 changed files with 10 additions and 2 deletions
|
|
@ -660,7 +660,9 @@ star_named_expression[expr_ty]:
|
|||
| named_expression
|
||||
|
||||
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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue