[Python-checkins] r59169 - python/trunk/Parser/tokenizer.c

amaury.forgeotdarc python-checkins at python.org
Sat Nov 24 14:20:22 CET 2007


Author: amaury.forgeotdarc
Date: Sat Nov 24 14:20:22 2007
New Revision: 59169

Modified:
   python/trunk/Parser/tokenizer.c
Log:
Warning "<> not supported in 3.x" should be enabled only when the -3 option is set.


Modified: python/trunk/Parser/tokenizer.c
==============================================================================
--- python/trunk/Parser/tokenizer.c	(original)
+++ python/trunk/Parser/tokenizer.c	Sat Nov 24 14:20:22 2007
@@ -1478,7 +1478,7 @@
 		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,


More information about the Python-checkins mailing list