[Python-checkins] [3.6] bpo-31330: Clarify that RawTextHelpFormatter collapses repeated newlines. (GH-3272) (GH-3429)

R. David Murray webhook-mailer at python.org
Thu Sep 7 18:26:43 EDT 2017


https://github.com/python/cpython/commit/e89b35dd2b87e85978b91e3e2dbdea1fc76d6be4
commit: e89b35dd2b87e85978b91e3e2dbdea1fc76d6be4
branch: 3.6
author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com>
committer: R. David Murray <rdmurray at bitdance.com>
date: 2017-09-07T17:18:45-04:00
summary:

[3.6] bpo-31330: Clarify that RawTextHelpFormatter collapses repeated newlines. (GH-3272) (GH-3429)

Also provide a solution if the user wants to keep multiple blank lines.
(cherry picked from commit 397c467c49385023de36411194d381ac993bae1a)

files:
M Doc/library/argparse.rst

diff --git a/Doc/library/argparse.rst b/Doc/library/argparse.rst
index 45303048174..9411bbd4ac5 100644
--- a/Doc/library/argparse.rst
+++ b/Doc/library/argparse.rst
@@ -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::



More information about the Python-checkins mailing list