summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRaymond Hettinger <python@rcn.com>2009-02-18 23:10:19 +0000
committerRaymond Hettinger <python@rcn.com>2009-02-18 23:10:19 +0000
commit08259e8f254a0595f8ed1be29b2d135f9b0d2d50 (patch)
treef149668877acf9edd9e8198e35e29125f0248919
parentc8223b09b0c457f764f93749d8af81a9b3f99317 (diff)
downloadcpython-git-08259e8f254a0595f8ed1be29b2d135f9b0d2d50.tar.gz
Py3k warnings now automatically include -Qwarn for division.
-rw-r--r--Misc/NEWS3
-rw-r--r--Modules/main.c2
2 files changed, 5 insertions, 0 deletions
diff --git a/Misc/NEWS b/Misc/NEWS
index 74c881c78a..aaa702b5fc 100644
--- 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.
diff --git a/Modules/main.c b/Modules/main.c
index 6ed2cd7abc..1a58071c46 100644
--- a/Modules/main.c
+++ b/Modules/main.c
@@ -317,6 +317,8 @@ Py_Main(int argc, char **argv)
case '3':
Py_Py3kWarningFlag++;
+ if (!Py_DivisionWarningFlag)
+ Py_DivisionWarningFlag = 1;
break;
case 'Q':