[issue17113] argparse.RawDescriptionHelpFormatter should not delete blank lines

paul j3 report at bugs.python.org
Fri Jul 18 00:53:23 CEST 2014


paul j3 added the comment:

A user could preserve blank lines by including a space (or more) in each.  That is, instead of ending with '\n', end with '\n \n'.

epilog = 'Epilog: No wrap text %(prog)s\n\tNext line\n \n'

---------------

I just checked a simple help.  The description and epilog get an extra blank line during assembly.  If 'epilog=None', there are 2 blank lines, which normally get reduced to one \n. 

So the philosophy of the formatter is to freely add \n between sections, regardless of whether they are empty (None) or not, and then deal with excess \n at the end.  Preserving blank lines during Raw requires rethinking that underlying philosophy.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue17113>
_______________________________________


More information about the Python-bugs-list mailing list