From: Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> Date: Thu, 7 Sep 2017 21:17:42 +0000 (-0700) Subject: [2.7] bpo-31330: Clarify that RawTextHelpFormatter collapses repeated newlines. ... X-Git-Tag: v2.7.15rc1~213 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=82cae7c5be4175e2173e4d342825b5315a9d612a;p=python [2.7] bpo-31330: Clarify that RawTextHelpFormatter collapses repeated newlines. (GH-3272) (GH-3428) Also provide a solution if the user wants to keep multiple blank lines. (cherry picked from commit 397c467c49385023de36411194d381ac993bae1a) --- diff --git a/Doc/library/argparse.rst b/Doc/library/argparse.rst index 1ea1f3fc1a..c8a5941df7 100644 --- a/Doc/library/argparse.rst +++ b/Doc/library/argparse.rst @@ -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::