Skip to content

Commit 397c467

Browse files
elenaoatbitdancer
authored andcommitted
bpo-31330: Clarify that RawTextHelpFormatter collapses repeated newlines. (#3272)
Also provide a solution if the user wants to keep multiple blank lines.
1 parent 05f01d8 commit 397c467

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Doc/library/argparse.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -426,7 +426,9 @@ should not be line-wrapped::
426426
-h, --help show this help message and exit
427427

428428
:class:`RawTextHelpFormatter` maintains whitespace for all sorts of help text,
429-
including argument descriptions.
429+
including argument descriptions. However, multiple new lines are replaced with
430+
one. If you wish to preserve multiple blank lines, add spaces between the
431+
newlines.
430432

431433
:class:`ArgumentDefaultsHelpFormatter` automatically adds information about
432434
default values to each of the argument help messages::

0 commit comments

Comments
 (0)