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

Steve Holden steve at holdenweb.com
Mon Apr 19 03:44:54 CEST 2010


Tobias Herp wrote:
> Steven Bethard schrieb:
>> On Sun, Apr 18, 2010 at 2:35 PM, Tobias Herp <Tobias.Herp at gmx.de> wrote:
>>> Steven Bethard schrieb:
>>>> On Sun, Apr 18, 2010 at 3:31 AM, Tobias Herp <Tobias.Herp at gmx.de> wrote:
>>>>> *Argparse should simply do this like optparse does already.*
>>>>> I.e., use '--version', '--help' and '-h' by default, but not '-v'.
>>>> [snip]
>>>>> The deprecation of the 'version' argument press-gangs people to replace
>>>>> it by
>>>>>  parser.add_argument('--version', action='version',
>>>>>                      version='<the version>',    # the only common part
>>>>>                      help="show program's version number and exit")
>>>> What Tobias has conveniently omitted is that there was not much
>>>> agreement on what the default behavior of the version flag should be.
>> [snip a bunch of Tobias's opinions on what the default should be]
>>>> But I'd really like a consensus about the correct behavior, and so far
>>>> I have not seen that.
>>> We'll have one ;-)
>> I hope you can understand that I don't consider your personal opinion
>> alone as a consensus.
> 
> Be careful.  There have been other personal opinions, and there are very
> many *X programs which form a standard which should be followed, and
> this is a /very strong/ argument, IMO.
> 
> What you conveniently omitted is that I collected a lot of examples and
> commented the choices (part of which were part of your poll).
> Unfortunately you completely ignored these very prosaic arguments.
> 
> By the way, I just had a look at your poll (currently 81 votes).
> Correct me if I'm wrong, but...
> - AFAICS, you didn't provide your audience with any background
>   information, e.g.
>   - how optparse does it (and migration should be as easy as possible,
>     right?)
>   - the existing de-facto standard "--version [-V]"
> - the choice which reflects my proposal got the most votes
>   (46.9% currently)
> - 42.0% voted for dropping the version argument, which is a minority
>   (bzw., do you really think the 46.9%
>   would like the version argument to be deprecated?!)
>   which apparently didn't consider the optparse migration/analogy issue.
> 
> Furthermore, nobody who dislikes the version feature is forced to use it.
> If 60% had voted for removal of a feature which is important and
> convenient for 40%, would you remove it?  Really?
> IMO, removal of a feature which is used by 40% is out of the question;
> and if removal is, deprecation is as well.
> 
> Back to the actual numbers: dropping the argument is impossible (/and so
> is deprecation/); drop the 42.0%.
> Take the remaining numbers: 46.9% voted for the change, and 11.1%
> against it.
> 
> Do you take your own poll seriously?
> 
When was this ever a democracy?

regards
 Steve
-- 
Steve Holden           +1 571 484 6266   +1 800 494 3119
See PyCon Talks from Atlanta 2010  http://pycon.blip.tv/
Holden Web LLC                 http://www.holdenweb.com/
UPCOMING EVENTS:        http://holdenweb.eventbrite.com/



More information about the Python-Dev mailing list