Hi, all,
(I don't know whether the first attempt to post this went through; I
could'nt find it, so I retry. My apologies for any inconvenience...)
I noticed that Python 2.7 beta 1 now contains the argparse module, which
might be a good thing. The code has been cleaned up, too, compared to
the c
Hi, all,
I noticed that Python 2.7 beta 1 now contains the argparse module, which
might be a good thing. The code has been cleaned up, too, compared to
the current version 1.1.
But there is still one issue with argparse; to tell the story from the
beginning:
The ArgumentParser class uses uses '
Ben Finney schrieb:
> Nick Coghlan writes:
>
>> I would be a lot happier if argparse as a standard library module just
>> followed optparse's lead here (i.e. defined '--version' only and punted
>> on the shorthand form).
>>
>> To deal with this in a backwards compatible way while remaining on the
Steven Bethard schrieb:
> On Sun, Apr 18, 2010 at 3:31 AM, Tobias Herp wrote:
>> To put it short:
>> *Argparse should simply do this like optparse does already.*
>> I.e., use '--version', '--help' and '-h' by default, but not '-v'
Steven Bethard schrieb:
> On Sun, Apr 18, 2010 at 4:03 AM, Nick Coghlan wrote:
>> To deal with this in a backwards compatible way while remaining on the
>> path to more conventional behaviour, I suggest the following:
>>
>> 1. For Python 2.7, deprecate *just* the "-v" default behaviour for the
>>
Eric Smith schrieb:
> 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',
Steven Bethard schrieb:
> On Sun, Apr 18, 2010 at 3:52 PM, Antoine Pitrou wrote:
>> Steven Bethard gmail.com> writes:
>>> Note
>>> that even though I agree with you that "-v/--version" is probably not
>>> the best choice, in the poll[2] 11% of people still wanted this.
>>
>> This strikes me as a
Steven Bethard schrieb:
> On Sun, Apr 18, 2010 at 2:35 PM, Tobias Herp wrote:
>> Steven Bethard schrieb:
>>> On Sun, Apr 18, 2010 at 3:31 AM, Tobias Herp wrote:
>>>> *Argparse should simply do this like optparse does already.*
>>>> I.e., use '--vers
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 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:
>
Nick Coghlan schrieb:
> Tobias Herp wrote:
>> 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
>&g
"Martin v. Löwis" schrieb:
>> - many optparse programs use the version argument
>> - many other programmers find this feature very convenient
>> - dropping or deprecating this is a totally unnecessary change
>> (I have not read a single real reason /why/ this should be done).
>
> You actually br
11 matches
Mail list logo