]> granicus.if.org Git - python/commitdiff
[2.7] bpo-31330: Clarify that RawTextHelpFormatter collapses repeated newlines. ...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Thu, 7 Sep 2017 21:17:42 +0000 (14:17 -0700)
committerR. David Murray <rdmurray@bitdance.com>
Thu, 7 Sep 2017 21:17:42 +0000 (17:17 -0400)
Also provide a solution if the user wants to keep multiple blank lines.
(cherry picked from commit 397c467c49385023de36411194d381ac993bae1a)

Doc/library/argparse.rst

index 1ea1f3fc1a564ad41face5c5f1e20588507ebae2..c8a5941df722e6fd7aab7db61eb6f9842c915e6c 100644 (file)
@@ -419,7 +419,9 @@ should not be line-wrapped::
     -h, --help  show this help message and exit
 
 :class:`RawTextHelpFormatter` maintains whitespace for all sorts of help text,
-including argument descriptions.
+including argument descriptions. However, multiple new lines are replaced with
+one. If you wish to preserve multiple blank lines, add spaces between the
+newlines.
 
 The other formatter class available, :class:`ArgumentDefaultsHelpFormatter`,
 will add information about the default value of each of the arguments::