[Python-Dev] Python 2.7b1 and argparse's version action (original) (raw)
Tobias Herp Tobias.Herp at gmx.de
Tue Apr 20 23:22:16 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 ]
Barry Warsaw schrieb:
On Apr 18, 2010, at 07:30 PM, Eric Smith 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='') I like this the best. I don't like argparse adding arguments for me. I concur. This gives me all the flexibility I need to make my programs accept exactly the arguments I want and print exactly the information I want to present.
But you had this possibility all the time!
No deprecation or removal of the simple and convenient 'version' argument is needed for this. Just omit it, and build your version action yourself. But please notice that there are others who appreciate this simple way to do it and don't need more.
-- Tobias
- 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 ]