diff options
author | Barry Warsaw <barry@python.org> | 1997-08-29 22:20:16 (GMT) |
---|---|---|
committer | Barry Warsaw <barry@python.org> | 1997-08-29 22:20:16 (GMT) |
commit | 83b6709d8ec3c81e5434e7fbe898cd60cb395d9f (patch) | |
tree | cddf497de5fea8328ffeda6796819cf8f35e49ad | |
parent | 757af0e7bb7c7d56670fbc84f1f5b0182a54e3d5 (diff) | |
download | cpython-83b6709d8ec3c81e5434e7fbe898cd60cb395d9f.zip cpython-83b6709d8ec3c81e5434e7fbe898cd60cb395d9f.tar.gz cpython-83b6709d8ec3c81e5434e7fbe898cd60cb395d9f.tar.bz2 |
Swap the sense of the -X option vis-a-vis Py_UseClassExceptionsFlag so
that class based exceptions are enabled by default. -X disables them
in favor of the old-style string exceptions.
-rw-r--r-- | Modules/main.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Modules/main.c b/Modules/main.c index 92497dc..cc18dfa 100644 --- a/Modules/main.c +++ b/Modules/main.c @@ -63,7 +63,7 @@ Options and arguments (and corresponding environment variables):\n\ and force prompts, even if stdin does not appear to be a terminal.\n\ -O : optimize generated bytecode (a tad).\n\ -u : unbuffered binary stdout and stderr (also PYTHONUNBUFFERED=x)\n\ --X : use experimental class based exceptions\n\ +-X : disable class based built-in exceptions\n\ -v : verbose (trace import statements) (also PYTHONVERBOSE=x)\n\ "; static char *usage_bot = "\ @@ -106,6 +106,7 @@ Py_Main(argc, argv) if ((p = getenv("PYTHONUNBUFFERED")) && *p != '\0') unbuffered = 1; + Py_UseClassExceptionsFlag = 1; while ((c = getopt(argc, argv, "c:diOuvX")) != EOF) { if (c == 'c') { /* -c is the last option; following arguments @@ -144,7 +145,7 @@ Py_Main(argc, argv) break; case 'X': - Py_UseClassExceptionsFlag++; + Py_UseClassExceptionsFlag = 0; break; /* This space reserved for other options */ |