summaryrefslogtreecommitdiff
path: root/Python
diff options
context:
space:
mode:
Diffstat (limited to 'Python')
-rw-r--r--Python/ast.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/Python/ast.c b/Python/ast.c
index 587f838f8d..184e33b4b5 100644
--- a/Python/ast.c
+++ b/Python/ast.c
@@ -4128,14 +4128,14 @@ warn_invalid_escape_sequence(struct compiling *c, const node *n,
if (msg == NULL) {
return -1;
}
- if (PyErr_WarnExplicitObject(PyExc_DeprecationWarning, msg,
+ if (PyErr_WarnExplicitObject(PyExc_SyntaxWarning, msg,
c->c_filename, LINENO(n),
NULL, NULL) < 0)
{
- if (PyErr_ExceptionMatches(PyExc_DeprecationWarning)) {
+ if (PyErr_ExceptionMatches(PyExc_SyntaxWarning)) {
const char *s;
- /* Replace the DeprecationWarning exception with a SyntaxError
+ /* Replace the SyntaxWarning exception with a SyntaxError
to get a more accurate error report */
PyErr_Clear();