mirror of
https://github.com/python/cpython.git
synced 2025-08-24 02:35:59 +00:00
bpo-39176: Improve error message for 'named assignment' (GH-17777)
This commit is contained in:
parent
ba82ee894c
commit
37143a8e3b
3 changed files with 4 additions and 4 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue