paul j3 added the comment:
This formatter produces an error if one or more of the arguments uses the
default `None` type (a string). This is because `None` does not have a
`.__name__`.
This HelpFormatter probably has been rarely, if ever, used. The metavar
parameter works just as well.
Steven Bethard steven.beth...@gmail.com added the comment:
Sorry about such a slow response on this. Thanks for the patch!
I think rather than adding an ArgumentParser constructor parameter though, we
should add a new formatter class. The attached patch allows you to write:
parser =
Filip Gruszczyński grusz...@gmail.com added the comment:
Well, since you are the designer of the package, I believe you have better
knowledge on how to extend it :-). I just provided a patch according to what
you described in the first message. Anyway having separate help formatter seems
Roundup Robot devnull@devnull added the comment:
New changeset a15d65d8f269 by Steven Bethard in branch 'default':
Issue #11174: Add argparse.MetavarTypeHelpFormatter, which uses type names
http://hg.python.org/cpython/rev/a15d65d8f269
--
nosy: +python-dev
Changes by Steven Bethard steven.beth...@gmail.com:
--
assignee: - bethard
resolution: - fixed
stage: needs patch - committed/rejected
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11174
Filip Gruszczyński grusz...@gmail.com added the comment:
First draft of patch with this functionality. Test, patch and docs are
included. I'll gladly work further on this, so I would appreciate some advice
and suggestions.
--
keywords: +patch
nosy: +gruszczy
Added file:
New submission from Steven Bethard steven.beth...@gmail.com:
Suggestion from a personal email:
I generally like my command line arguments that take a
value to specify the type, e.g.,
--runs int how many runs to do
Naturally I can do this using the metavars argument in every