summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Doc/tut/tut.tex9
-rw-r--r--Modules/main.c3
2 files changed, 11 insertions, 1 deletions
diff --git a/Doc/tut/tut.tex b/Doc/tut/tut.tex
index f647aed..71d2973 100644
--- a/Doc/tut/tut.tex
+++ b/Doc/tut/tut.tex
@@ -1926,6 +1926,15 @@ files are ignored and \code{.py} files are compiled to optimized
bytecode.
\item
+Passing two \code{-O} flags to the Python interpreter (\code{-OO})
+will cause the bytecode compiler to perform optimizations that could
+in some rare cases result in malfunctioning programs. Currently only
+\code{__doc__} strings are removed from the bytecode, resulting in more
+compact \file{.pyo} files. Since some programs may rely on having
+these available, you should only use this option if you know what
+you're doing.
+
+\item
A program doesn't run any faster when it is read from a
\file{.pyc} or \file{.pyo} file than when it is read from a \file{.py}
file; the only thing that's faster about \file{.pyc} or \file{.pyo}
diff --git a/Modules/main.c b/Modules/main.c
index 36b2be9..556a67a 100644
--- a/Modules/main.c
+++ b/Modules/main.c
@@ -60,7 +60,7 @@ static int orig_argc;
/* Short usage message (with %s for argv0) */
static char *usage_line =
-"usage: %s [-d] [-i] [-O] [-S] [-u] [-v] [-x] [-X] [-c cmd | file | -] [arg] ...\n";
+"usage: %s [option] ... [-c cmd | file | -] [arg] ...\n";
/* Long usage message, split into parts < 512 bytes */
static char *usage_top = "\
@@ -69,6 +69,7 @@ Options and arguments (and corresponding environment variables):\n\
-i : inspect interactively after running script, (also PYTHONINSPECT=x)\n\
and force prompts, even if stdin does not appear to be a terminal\n\
-O : optimize generated bytecode (a tad; also PYTHONOPTIMIZE=x)\n\
+-OO : remove doc-strings in addition to the -O optimizations\n\
-S : don't imply 'import site' on initialization\n\
-t : issue warnings about inconsistent tab usage (-tt: issue errors)\n\
";