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

R. David Murray webhook-mailer at python.org
Thu Sep 7 16:06:50 EDT 2017


https://github.com/python/cpython/commit/397c467c49385023de36411194d381ac993bae1a
commit: 397c467c49385023de36411194d381ac993bae1a
branch: master
author: Elena Oat <oat.elena at gmail.com>
committer: R. David Murray <rdmurray at bitdance.com>
date: 2017-09-07T16:06:45-04:00
summary:

bpo-31330: Clarify that RawTextHelpFormatter collapses repeated newlines. (#3272)

Also provide a solution if the user wants to keep multiple blank lines.

files:
M Doc/library/argparse.rst

diff --git a/Doc/library/argparse.rst b/Doc/library/argparse.rst
index ab4bc92e5bd..c425be6d481 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