]> granicus.if.org Git - python/commitdiff
bpo-31330: Clarify that RawTextHelpFormatter collapses repeated newlines. (#3272)
authorElena Oat <oat.elena@gmail.com>
Thu, 7 Sep 2017 20:06:45 +0000 (23:06 +0300)
committerR. David Murray <rdmurray@bitdance.com>
Thu, 7 Sep 2017 20:06:45 +0000 (16:06 -0400)
Also provide a solution if the user wants to keep multiple blank lines.

Doc/library/argparse.rst

index ab4bc92e5bdc3da01998c690ca8216d42bc80ae3..c425be6d481dba31a869c9f8bad0771afcaa91f5 100644 (file)
@@ -426,7 +426,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.
 
 :class:`ArgumentDefaultsHelpFormatter` automatically adds information about
 default values to each of the argument help messages::