[issue7284] argparse - display version in usage by default

anatoly techtonik report at bugs.python.org
Sat Mar 26 12:20:45 CET 2011

anatoly techtonik <techtonik at gmail.com> added the comment:

On Sat, Mar 26, 2011 at 12:20 PM, Steven Bethard <report at bugs.python.org> wrote:

> I guess we could add, say, a headline= option to ArgumentParser which would then be printed before the usage message if it's really crucial to have that message first... I'd rather not though if the description= approach is acceptable to you, since adding headline= would add more complexity to an already complex ArgumentParser constructor.

Instead of adding "epilog", "usage", "description" to constructor, you
could just add one "usage_template" with these substitution variables,
including "version".


Python tracker <report at bugs.python.org>

More information about the Python-bugs-list mailing list