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

index 2ebd6cc32550761e67f4415ffb17a25b3f05b4a1..f95da43f0aae8e82842746aed5b661214c36be3a 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -12,6 +12,9 @@ What's New in Python 2.6.2
 Core and Builtins
 -----------------
 
+- Running Python with the -3 option now also warns about classic division
+  for ints and longs.
+
 - Issue #5013: Fixed a bug in FileHandler which occurred when the delay
   parameter was set.
 
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':