Skip to content

Commit 24526bd

Browse files
committed
fix formatting issues and missing info in man page and --help
1 parent db3ef0c commit 24526bd

File tree

2 files changed

+22
-9
lines changed

2 files changed

+22
-9
lines changed

Misc/python.man

+16-3
Original file line numberDiff line numberDiff line change
@@ -69,10 +69,10 @@ python \- an interpreted, interactive, object-oriented programming language
6969
.B \-x
7070
]
7171
[
72-
[
7372
.B \-X
7473
.I option
7574
]
75+
[
7676
.B \-?
7777
]
7878
.br
@@ -310,7 +310,8 @@ Set implementation specific option. The following options are available:
310310
more verbose than the default if the code is correct: new warnings are
311311
only emitted when an issue is detected. Effect of the developer mode:
312312
* Add default warning filter, as -W default
313-
* Install debug hooks on memory allocators: see the PyMem_SetupDebugHooks() C function
313+
* Install debug hooks on memory allocators: see the PyMem_SetupDebugHooks()
314+
C function
314315
* Enable the faulthandler module to dump the Python traceback on a crash
315316
* Enable asyncio debug mode
316317
* Set the dev_mode attribute of sys.flags to True
@@ -321,7 +322,19 @@ Set implementation specific option. The following options are available:
321322
otherwise activate automatically). See PYTHONUTF8 for more details
322323

323324
-X pycache_prefix=PATH: enable writing .pyc files to a parallel tree rooted at the
324-
given directory instead of to the code tree.
325+
given directory instead of to the code tree.
326+
327+
-X warn_default_encoding: enable opt-in EncodingWarning for 'encoding=None'
328+
329+
-X no_debug_ranges: disable the inclusion of the tables mapping extra location
330+
information (end line, start column offset and end column offset) to every
331+
instruction in code objects. This is useful when smaller code objects and pyc
332+
files are desired as well as suppressing the extra visual location indicators
333+
when the interpreter displays tracebacks.
334+
335+
-X frozen_modules=[on|off]: whether or not frozen modules should be used
336+
The default is "on" (or "off" if you are running a local build).
337+
325338
.TP
326339
.B \-x
327340
Skip the first line of the source. This is intended for a DOS

Python/initconfig.c

+6-6
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,12 @@ Options and arguments (and corresponding environment variables):\n\
3535
and comparing bytes/bytearray with str. (-bb: issue errors)\n\
3636
-B : don't write .pyc files on import; also PYTHONDONTWRITEBYTECODE=x\n\
3737
-c cmd : program passed in as string (terminates option list)\n\
38+
--check-hash-based-pycs always|default|never:\n\
39+
control how Python invalidates hash-based .pyc files\n\
3840
-d : turn on parser debugging output (for experts only, only works on\n\
3941
debug builds); also PYTHONDEBUG=x\n\
4042
-E : ignore PYTHON* environment variables (such as PYTHONPATH)\n\
41-
-h : print this help message and exit (also --help)\n\
43+
-h : print this help message and exit (also --help or -?)\n\
4244
";
4345
static const char usage_2[] = "\
4446
-i : inspect interactively after running script; forces a prompt even\n\
@@ -82,7 +84,8 @@ static const char usage_3[] = "\
8284
checks which are too expensive to be enabled by default. Effect of the\n\
8385
developer mode:\n\
8486
* Add default warning filter, as -W default\n\
85-
* Install debug hooks on memory allocators: see the PyMem_SetupDebugHooks() C function\n\
87+
* Install debug hooks on memory allocators: see the PyMem_SetupDebugHooks()\n\
88+
C function\n\
8689
* Enable the faulthandler module to dump the Python traceback on a crash\n\
8790
* Enable asyncio debug mode\n\
8891
* Set the dev_mode attribute of sys.flags to True\n\
@@ -100,9 +103,6 @@ static const char usage_3[] = "\
100103
when the interpreter displays tracebacks.\n\
101104
-X frozen_modules=[on|off]: whether or not frozen modules should be used.\n\
102105
The default is \"on\" (or \"off\" if you are running a local build).\n\
103-
\n\
104-
--check-hash-based-pycs always|default|never:\n\
105-
control how Python invalidates hash-based .pyc files\n\
106106
";
107107
static const char usage_4[] = "\
108108
file : program read from script file\n\
@@ -141,7 +141,7 @@ static const char usage_6[] =
141141
"PYTHONNODEBUGRANGES: If this variable is set, it disables the inclusion of the \n"
142142
" tables mapping extra location information (end line, start column offset \n"
143143
" and end column offset) to every instruction in code objects. This is useful \n"
144-
" when smaller cothe de objects and pyc files are desired as well as suppressing the \n"
144+
" when smaller code objects and pyc files are desired as well as suppressing the \n"
145145
" extra visual location indicators when the interpreter displays tracebacks.\n";
146146

147147
#if defined(MS_WINDOWS)

0 commit comments

Comments
 (0)