mirror of
https://github.com/python/cpython.git
synced 2026-05-06 12:49:07 -04:00
bpo-39176: Improve error message for 'named assignment' (GH-17777)
This commit is contained in:
committed by
Raymond Hettinger
parent
ba82ee894c
commit
37143a8e3b
+1
-1
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user