[Python-Dev] Python 2.7b1 and argparse's version action

Nick Coghlan ncoghlan at gmail.com
Mon Apr 19 00:57:24 CEST 2010


Steven Bethard wrote:
> By the way, we could simplify the typical add_argument usage by adding
> "show program's version number and exit" as the default help for the
> 'version' action. Then you should just write:
> 
>     parser.add_argument('--version', action='version', version='<the version>')

With that change, I would have no problem with the current argparse
behaviour (since doing it this way makes it very easy for people to add
a "-V" shortcut if they want one).

Cheers,
Nick.

-- 
Nick Coghlan   |   ncoghlan at gmail.com   |   Brisbane, Australia
---------------------------------------------------------------


More information about the Python-Dev mailing list