mirror of
https://github.com/python/cpython.git
synced 2025-09-13 20:27:05 +00:00
Warning "<> not supported in 3.x" should be enabled only when the -3 option is set.
This commit is contained in:
parent
f8b6abd972
commit
6dae85f409
1 changed files with 1 additions and 1 deletions
|
@ -1478,7 +1478,7 @@ tok_get(register struct tok_state *tok, char **p_start, char **p_end)
|
|||
int c2 = tok_nextc(tok);
|
||||
int token = PyToken_TwoChars(c, c2);
|
||||
#ifndef PGEN
|
||||
if (token == NOTEQUAL && c == '<') {
|
||||
if (Py_Py3kWarningFlag && token == NOTEQUAL && c == '<') {
|
||||
if (PyErr_WarnExplicit(PyExc_DeprecationWarning,
|
||||
"<> not supported in 3.x",
|
||||
tok->filename, tok->lineno,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue