[Python-checkins] r69743 - in python/trunk: Misc/NEWS Modules/main.c

raymond.hettinger python-checkins at python.org
Thu Feb 19 00:10:19 CET 2009


Author: raymond.hettinger
Date: Thu Feb 19 00:10:19 2009
New Revision: 69743

Log:
Py3k warnings now automatically include -Qwarn for division.

Modified:
   python/trunk/Misc/NEWS
   python/trunk/Modules/main.c

Modified: python/trunk/Misc/NEWS
==============================================================================
--- python/trunk/Misc/NEWS	(original)
+++ python/trunk/Misc/NEWS	Thu Feb 19 00:10:19 2009
@@ -12,6 +12,9 @@
 Core and Builtins
 -----------------
 
+- Running Python with the -3 option now also warns about classic division
+  for ints and longs.
+
 - Issue #5260: Long integers now consume less memory:  average
   saving is 2 bytes per long on a 32-bit system and 6 bytes per long
   on a 64-bit system.

Modified: python/trunk/Modules/main.c
==============================================================================
--- python/trunk/Modules/main.c	(original)
+++ python/trunk/Modules/main.c	Thu Feb 19 00:10:19 2009
@@ -317,6 +317,8 @@
 
 		case '3':
 			Py_Py3kWarningFlag++;
+			if (!Py_DivisionWarningFlag)
+				Py_DivisionWarningFlag = 1;
 			break;
 
 		case 'Q':


More information about the Python-checkins mailing list