bpo-39176: Improve error message for 'named assignment' (GH-17777)

This commit is contained in:
Ned Batchelder 2019-12-31 21:40:58 -05:00 committed by Raymond Hettinger
parent ba82ee894c
commit 37143a8e3b
3 changed files with 4 additions and 4 deletions

View file

@ -1955,7 +1955,7 @@ ast_for_namedexpr(struct compiling *c, const node *n)
if (target->kind != Name_kind) {
const char *expr_name = get_expr_name(target);
if (expr_name != NULL) {
ast_error(c, n, "cannot use named assignment with %s", expr_name);
ast_error(c, n, "cannot use assignment expressions with %s", expr_name);
}
return NULL;
}