]> granicus.if.org Git - python/commitdiff
Py3k warnings now automatically include -Qwarn for division.
authorRaymond Hettinger <python@rcn.com>
Wed, 18 Feb 2009 23:10:19 +0000 (23:10 +0000)
committerRaymond Hettinger <python@rcn.com>
Wed, 18 Feb 2009 23:10:19 +0000 (23:10 +0000)
Misc/NEWS
Modules/main.c

index 74c881c78a102753fd06c0e4dca21474c373640b..aaa702b5fcf8befc96d8695167a4f518fde958b5 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -12,6 +12,9 @@ What's New in Python 2.7 alpha 1
 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.
index 6ed2cd7abce7ac9ac9eb37a0b6fe2939eba73188..1a58071c4673b076c30122821a02741223ec6102 100644 (file)
@@ -317,6 +317,8 @@ Py_Main(int argc, char **argv)
 
                case '3':
                        Py_Py3kWarningFlag++;
+                       if (!Py_DivisionWarningFlag)
+                               Py_DivisionWarningFlag = 1;
                        break;
 
                case 'Q':