[issue6454] Add "example" keyword argument to optparse constructor

Greg Ward report at bugs.python.org
Sun Nov 22 16:30:21 CET 2009


Greg Ward <greg at gerg.ca> added the comment:

> but I feel there is a better and more general
> solution - just provide some minimal formatting for description: treat
> empty line as paragraph separator. Then I would be able to add example
> or anything else to the description formatting it as necessary

Agreed.  I have also been bitten by optparse munging paragraphs together
in the description, and it's annoying.  I *think* we could get away with
two simple rules:

  * blank lines separate paragraphs
  * indented lines don't get wrapped

Obviously no one wants to reinvent reStructuredText, but I think that
should do the trick.

If that works, I think the suggested 'examples' arg becomes unnecessary.

----------

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


More information about the Python-bugs-list mailing list