[3.10] bpo-44273: Improve syntax error message for assigning to "..." (GH-26477) (GH-26478)
Use "ellipsis" instead of "Ellipsis" in syntax error messages to eliminate confusion with built-in variable Ellipsis.
(cherry picked from commit 39dd141)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
diff --git a/Parser/pegen.c b/Parser/pegen.c
index 548a647..aac7e36 100644
--- a/Parser/pegen.c
+++ b/Parser/pegen.c
@@ -217,7 +217,7 @@
return "True";
}
if (value == Py_Ellipsis) {
- return "Ellipsis";
+ return "ellipsis";
}
return "literal";
}