diff options
author | shadchin <shadchin@yandex-team.com> | 2023-10-03 23:32:21 +0300 |
---|---|---|
committer | shadchin <shadchin@yandex-team.com> | 2023-10-03 23:48:51 +0300 |
commit | 01ffd024041ac933854c367fb8d1b5682d19883f (patch) | |
tree | b70aa497ba132a133ccece49f7763427dcd0743f /contrib/tools/python3/src/Python/ast.c | |
parent | a33fdb9a34581fd124e92535153b1f1fdeca6aaf (diff) | |
download | ydb-01ffd024041ac933854c367fb8d1b5682d19883f.tar.gz |
Update Python 3 to 3.11.6
Diffstat (limited to 'contrib/tools/python3/src/Python/ast.c')
-rw-r--r-- | contrib/tools/python3/src/Python/ast.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/contrib/tools/python3/src/Python/ast.c b/contrib/tools/python3/src/Python/ast.c index 95179cb702..8bc3c96237 100644 --- a/contrib/tools/python3/src/Python/ast.c +++ b/contrib/tools/python3/src/Python/ast.c @@ -379,6 +379,11 @@ validate_expr(struct validator *state, expr_ty exp, expr_context_ty ctx) ret = validate_exprs(state, exp->v.Tuple.elts, ctx, 0); break; case NamedExpr_kind: + if (exp->v.NamedExpr.target->kind != Name_kind) { + PyErr_SetString(PyExc_TypeError, + "NamedExpr target must be a Name"); + return 0; + } ret = validate_expr(state, exp->v.NamedExpr.value, Load); break; /* This last case doesn't have any checking. */ |