[Python-Dev] Python 2.7b1 and argparse's version action (original) (raw)
Steven Bethard steven.bethard at gmail.com
Mon Apr 19 01:22:12 CEST 2010
- Previous message: [Python-Dev] Python 2.7b1 and argparse's version action
- Next message: [Python-Dev] Python 2.7b1 and argparse's version action
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Sun, Apr 18, 2010 at 3:57 PM, Nick Coghlan <ncoghlan at gmail.com> wrote:
Steven Bethard wrote:
By the way, we could simplify the typical addargument usage by adding "show program's version number and exit" as the default help for the 'version' action. Then you should just write:
parser.addargument('--version', action='version', 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).
Probably this should happen regardless of the outcome of the constructor argument. The only reason it wasn't already there is that I hadn't thought of it. ;-)
Steve
Where did you get that preposterous hypothesis? Did Steve tell you that? --- The Hiphopopotamus
- Previous message: [Python-Dev] Python 2.7b1 and argparse's version action
- Next message: [Python-Dev] Python 2.7b1 and argparse's version action
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]