This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Phillip.M.Feldman@gmail.com
Recipients Phillip.M.Feldman@gmail.com, csernazs
Date 2018-07-31.21:54:48
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <CAB2ViTbOWZpv=YNfz=f2ziEH=Zt3Sv4kb1ayf0HAT777WNpEzA@mail.gmail.com>
In-reply-to <1533066232.3.0.56676864532.issue34299@psf.upfronthosting.co.za>
Content
That works.  Thanks!

I think that this boils down to a documentation issue.  The following says
that the default behavior is to line-wrap the help messages.  At least to
me, this doesn't imply that whitespace is getting eaten.

RawDescriptionHelpFormatter
<https://docs.python.org/3/library/argparse.html#argparse.RawDescriptionHelpFormatter>
and RawTextHelpFormatter
<https://docs.python.org/3/library/argparse.html#argparse.RawTextHelpFormatter>
give more control over how textual descriptions are displayed. By default,
ArgumentParser
<https://docs.python.org/3/library/argparse.html#argparse.ArgumentParser>
objects line-wrap the description
<https://docs.python.org/3/library/argparse.html#description> and epilog
<https://docs.python.org/3/library/argparse.html#epilog> texts in
command-line help messages:

On Tue, Jul 31, 2018 at 12:43 PM, Zsolt Cserna <report@bugs.python.org>
wrote:

>
> Zsolt Cserna <cserna.zsolt@gmail.com> added the comment:
>
> You would need to use the RawTextHelpFormatter as format_class for the
> constructor. In this case, argparse will apply no re-wrapping of the
> description.
>
> import argparse
>
> parser = argparse.ArgumentParser(description="""foo
> bar
> baz""", formatter_class=argparse.RawTextHelpFormatter)
>
> ----------
> nosy: +csernazs
>
> _______________________________________
> Python tracker <report@bugs.python.org>
> <https://bugs.python.org/issue34299>
> _______________________________________
>
History
Date User Action Args
2018-07-31 21:54:49Phillip.M.Feldman@gmail.comsetrecipients: + Phillip.M.Feldman@gmail.com, csernazs
2018-07-31 21:54:48Phillip.M.Feldman@gmail.comlinkissue34299 messages
2018-07-31 21:54:48Phillip.M.Feldman@gmail.comcreate