summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2006-03-15 04:58:47 (GMT)
committerGuido van Rossum <guido@python.org>2006-03-15 04:58:47 (GMT)
commit45aecf451a64fb1ebe5e74d0b00965ac8d99dff6 (patch)
treea7edcfb45ceafcffde68a3542aeba67089ea81cb /Modules
parentf3175f6341ae207543a0d2d3be36c457349066e6 (diff)
downloadcpython-45aecf451a64fb1ebe5e74d0b00965ac8d99dff6.zip
cpython-45aecf451a64fb1ebe5e74d0b00965ac8d99dff6.tar.gz
cpython-45aecf451a64fb1ebe5e74d0b00965ac8d99dff6.tar.bz2
Checkpoint. 218 tests are okay; 53 are failing. Done so far:
- all classes are new-style (but ripping out classobject.[ch] isn't done) - int/int -> float - all exceptions must derive from BaseException - absolute import - 'as' and 'with' are keywords
Diffstat (limited to 'Modules')
-rw-r--r--Modules/main.c35
1 files changed, 2 insertions, 33 deletions
diff --git a/Modules/main.c b/Modules/main.c
index 8e7c50b..c8298fb 100644
--- a/Modules/main.c
+++ b/Modules/main.c
@@ -2,7 +2,6 @@
#include "Python.h"
#include "osdefs.h"
-#include "code.h" /* For CO_FUTURE_DIVISION */
#include "import.h"
#ifdef __VMS
@@ -34,7 +33,7 @@ static char **orig_argv;
static int orig_argc;
/* command line options */
-#define BASE_OPTS "c:dEhim:OQ:StuUvVW:xX"
+#define BASE_OPTS "c:dEhim:OStuvVW:xX"
#ifndef RISCOS
#define PROGRAM_OPTS BASE_OPTS
@@ -64,7 +63,6 @@ static char *usage_2 = "\
-m mod : run library module as a script (terminates option list)\n\
-O : optimize generated bytecode (a tad; also PYTHONOPTIMIZE=x)\n\
-OO : remove doc-strings in addition to the -O optimizations\n\
--Q arg : division options: -Qold (default), -Qwarn, -Qwarnall, -Qnew\n\
-S : don't imply 'import site' on initialization\n\
-t : issue warnings about inconsistent tab usage (-tt: issue errors)\n\
-u : unbuffered binary stdout and stderr (also PYTHONUNBUFFERED=x)\n\
@@ -220,33 +218,6 @@ Py_Main(int argc, char **argv)
Py_DebugFlag++;
break;
- case 'Q':
- if (strcmp(_PyOS_optarg, "old") == 0) {
- Py_DivisionWarningFlag = 0;
- break;
- }
- if (strcmp(_PyOS_optarg, "warn") == 0) {
- Py_DivisionWarningFlag = 1;
- break;
- }
- if (strcmp(_PyOS_optarg, "warnall") == 0) {
- Py_DivisionWarningFlag = 2;
- break;
- }
- if (strcmp(_PyOS_optarg, "new") == 0) {
- /* This only affects __main__ */
- cf.cf_flags |= CO_FUTURE_DIVISION;
- /* And this tells the eval loop to treat
- BINARY_DIVIDE as BINARY_TRUE_DIVIDE */
- _Py_QnewFlag = 1;
- break;
- }
- fprintf(stderr,
- "-Q option should be `-Qold', "
- "`-Qwarn', `-Qwarnall', or `-Qnew' only\n");
- return usage(2, argv[0]);
- /* NOTREACHED */
-
case 'i':
inspect++;
saw_inspect_flag = 1;
@@ -288,12 +259,10 @@ Py_Main(int argc, char **argv)
skipfirstline = 1;
break;
- case 'U':
- Py_UnicodeFlag++;
- break;
case 'h':
help++;
break;
+
case 'V':
version++;
break;