summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2020-01-01 03:28:08 (GMT)
committerRaymond Hettinger <rhettinger@users.noreply.github.com>2020-01-01 03:28:08 (GMT)
commit6c004955aceb8a0cd8e14afbc608ebfdf7c8aa4a (patch)
tree51b36d7bffc65cdc050d9c3b8ba406419a701e24 /Python
parent302b35f82bdaac817966638e2630b452f4123958 (diff)
downloadcpython-6c004955aceb8a0cd8e14afbc608ebfdf7c8aa4a.zip
cpython-6c004955aceb8a0cd8e14afbc608ebfdf7c8aa4a.tar.gz
cpython-6c004955aceb8a0cd8e14afbc608ebfdf7c8aa4a.tar.bz2
bpo-39176: Improve error message for 'named assignment' (GH-17777) (GH-17778)
(cherry picked from commit 37143a8e3b2e9245d52f4ddebbdd1c6121c96884) Co-authored-by: Ned Batchelder <ned@nedbatchelder.com> Co-authored-by: Ned Batchelder <ned@nedbatchelder.com>
Diffstat (limited to 'Python')
-rw-r--r--Python/ast.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Python/ast.c b/Python/ast.c
index e70ab51..6cf71ce 100644
--- a/Python/ast.c
+++ b/Python/ast.c
@@ -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;
}