diff options
Diffstat (limited to 'Python/ast.c')
-rw-r--r-- | Python/ast.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/Python/ast.c b/Python/ast.c index 5555cf7..9354b59 100644 --- a/Python/ast.c +++ b/Python/ast.c @@ -1336,10 +1336,14 @@ ast_for_atom(struct compiling *c, const node *n) return Dict(keys, values, LINENO(n), n->n_col_offset, c->c_arena); } case BACKQUOTE: { /* repr */ - if (Py_Py3kWarningFlag && - PyErr_Warn(PyExc_DeprecationWarning, - "backquote not supported in 3.x") < 0) - return NULL; + if (Py_Py3kWarningFlag) { + if (PyErr_WarnExplicit(PyExc_DeprecationWarning, + "backquote not supported in 3.x", + "<unknown>", LINENO(n), + NULL, NULL)) { + ; //return NULL; + } + } expr_ty expression = ast_for_testlist(c, CHILD(n, 1)); if (!expression) return NULL; |