summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2009-04-12 12:08:12 (GMT)
committerGeorg Brandl <georg@python.org>2009-04-12 12:08:12 (GMT)
commit3c4a5463b2e022cc43478de78a0afbd283b3ddef (patch)
tree75b20206fa7754ddd757c6dd7fb1baa10c4b1f07
parent507690c6e5849e98e35c1848cdac0008b465a3b3 (diff)
downloadcpython-3c4a5463b2e022cc43478de78a0afbd283b3ddef.zip
cpython-3c4a5463b2e022cc43478de78a0afbd283b3ddef.tar.gz
cpython-3c4a5463b2e022cc43478de78a0afbd283b3ddef.tar.bz2
#5704: let python -3 imply -t as well.
-rw-r--r--Misc/NEWS2
-rw-r--r--Modules/main.c4
2 files changed, 6 insertions, 0 deletions
diff --git a/Misc/NEWS b/Misc/NEWS
index d66695c..2112a80 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -12,6 +12,8 @@ What's New in Python 2.7 alpha 1
Core and Builtins
-----------------
+- Issue #5704: the "-3" command-line option now implies "-t".
+
- Issue #2170: refactored xml.dom.minidom.normalize, increasing both
its clarity and its speed.
diff --git a/Modules/main.c b/Modules/main.c
index 1a58071..d6df92f 100644
--- a/Modules/main.c
+++ b/Modules/main.c
@@ -432,6 +432,10 @@ Py_Main(int argc, char **argv)
return 0;
}
+ if (Py_Py3kWarningFlag && !Py_TabcheckFlag)
+ /* -3 implies -t (but not -tt) */
+ Py_TabcheckFlag = 1;
+
if (!Py_InspectFlag &&
(p = Py_GETENV("PYTHONINSPECT")) && *p != '\0')
Py_InspectFlag = 1;