]> granicus.if.org Git - python/commitdiff
Warning "<> not supported in 3.x" should be enabled only when the -3 option is set.
authorAmaury Forgeot d'Arc <amauryfa@gmail.com>
Sat, 24 Nov 2007 13:20:22 +0000 (13:20 +0000)
committerAmaury Forgeot d'Arc <amauryfa@gmail.com>
Sat, 24 Nov 2007 13:20:22 +0000 (13:20 +0000)
Parser/tokenizer.c

index 4ff2b98589addf63716e9aac2f33efcb149a17ea..f59ab59ad561b4fc1f0d6fcd4f0b6e9e71211f6c 100644 (file)
@@ -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,