mirror of
https://github.com/python/cpython.git
synced 2025-07-28 13:44:43 +00:00
change Py3k backquote warning to a SyntaxWarning and add a test
This commit is contained in:
parent
1f1174edf3
commit
2fe3ef8750
2 changed files with 7 additions and 1 deletions
|
@ -1364,7 +1364,7 @@ ast_for_atom(struct compiling *c, const node *n)
|
|||
case BACKQUOTE: { /* repr */
|
||||
expr_ty expression;
|
||||
if (Py_Py3kWarningFlag) {
|
||||
if (PyErr_WarnExplicit(PyExc_DeprecationWarning,
|
||||
if (PyErr_WarnExplicit(PyExc_SyntaxWarning,
|
||||
"backquote not supported in 3.x; use repr()",
|
||||
c->c_filename, LINENO(n),
|
||||
NULL, NULL)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue