Chris Jerdonek added the comment:

+1 to the feature.

A closely-related use case is customizing the message displayed by error(), 
which is normally the usage string followed by the error message.  I wanted to 
append instructions on how to invoke --help, and implemented it this way for 
CPython's regrtest:

http://hg.python.org/cpython/file/6ee721029fd5/Lib/test/regrtest.py#l205

Also take a look at how regrtest formats its usage string as another use case 
to satisfy:

http://hg.python.org/cpython/file/6ee721029fd5/Lib/test/regrtest.py#l9

It seems like many argparse customizations take the form of "override this 
method."  Would it make sense for the API to be for customizers to override 
string-returning methods like make_usage() and make_error() (and that accept a 
dictionary)?  That may give a bit more control than a format string.

----------
nosy: +chris.jerdonek

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue11695>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to