mirror of
https://github.com/python/cpython.git
synced 2025-12-09 02:35:14 +00:00
Parse new command line option -X which enables exception classes.
This commit is contained in:
parent
0596c2ac28
commit
f488af3360
1 changed files with 6 additions and 1 deletions
|
|
@ -63,6 +63,7 @@ Options and arguments (and corresponding environment variables):\n\
|
||||||
and force prompts, even if stdin does not appear to be a terminal.\n\
|
and force prompts, even if stdin does not appear to be a terminal.\n\
|
||||||
-O : optimize generated bytecode (a tad).\n\
|
-O : optimize generated bytecode (a tad).\n\
|
||||||
-u : unbuffered binary stdout and stderr (also PYTHONUNBUFFERED=x)\n\
|
-u : unbuffered binary stdout and stderr (also PYTHONUNBUFFERED=x)\n\
|
||||||
|
-X : use experimental class based exceptions\n\
|
||||||
-v : verbose (trace import statements) (also PYTHONVERBOSE=x)\n\
|
-v : verbose (trace import statements) (also PYTHONVERBOSE=x)\n\
|
||||||
";
|
";
|
||||||
static char *usage_bot = "\
|
static char *usage_bot = "\
|
||||||
|
|
@ -105,7 +106,7 @@ Py_Main(argc, argv)
|
||||||
if ((p = getenv("PYTHONUNBUFFERED")) && *p != '\0')
|
if ((p = getenv("PYTHONUNBUFFERED")) && *p != '\0')
|
||||||
unbuffered = 1;
|
unbuffered = 1;
|
||||||
|
|
||||||
while ((c = getopt(argc, argv, "c:diOuv")) != EOF) {
|
while ((c = getopt(argc, argv, "c:diOuvX")) != EOF) {
|
||||||
if (c == 'c') {
|
if (c == 'c') {
|
||||||
/* -c is the last option; following arguments
|
/* -c is the last option; following arguments
|
||||||
that look like options are left for the
|
that look like options are left for the
|
||||||
|
|
@ -142,6 +143,10 @@ Py_Main(argc, argv)
|
||||||
Py_VerboseFlag++;
|
Py_VerboseFlag++;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case 'X':
|
||||||
|
Py_UseClassExceptionsFlag++;
|
||||||
|
break;
|
||||||
|
|
||||||
/* This space reserved for other options */
|
/* This space reserved for other options */
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue