[New-bugs-announce] [issue11174] add argparse formatting option to display type names for metavar

Steven Bethard report at bugs.python.org
Thu Feb 10 16:45:53 CET 2011


New submission from Steven Bethard <steven.bethard at 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
add_argument() call, but that can become tedious. So I suggest adding a
metavars argument to the ArgumentParser constructor; default
metavars=None (current behaviour); metavars=type (show type names). And
of course, allow metavars specified in add_argument() calls to override
on a case by case basis.

----------
components: Library (Lib)
messages: 128300
nosy: bethard
priority: low
severity: normal
stage: needs patch
status: open
title: add argparse formatting option to display type names for metavar
type: feature request
versions: Python 3.3

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


More information about the New-bugs-announce mailing list