Re: argparse zero-length switch

2011-10-15 Thread Gregory Ewing
Steven D'Aprano wrote: And it isn't like you gain any extra clarity or expressiveness, or even a major saving of typing! "-s" vs "@". You don't even save a key stroke: "@" requires two keystrokes, just as "-s" does. Also keep in mind that not all keystrokes are equal. Someone who uses all thei

Re: argparse zero-length switch

2011-10-15 Thread Steven D'Aprano
On Sat, 15 Oct 2011 20:29:40 -0700, Carl Banks wrote: > I don't really care for or agree with Steven and Ben Finney's foolish > consistency. I already weighed it against the benefits of consistency, > and decided that this parameter was easily important enough to warrant > special treatment. It'

Re: argparse zero-length switch

2011-10-15 Thread Chris Angelico
On Sun, Oct 16, 2011 at 2:29 PM, Carl Banks wrote: > I don't really care for or agree with Steven and Ben Finney's foolish > consistency.  I already weighed it against the benefits of consistency, and > decided that this parameter was easily important enough to warrant special > treatment.  It'

Re: argparse zero-length switch

2011-10-15 Thread Carl Banks
On Friday, October 14, 2011 12:41:26 AM UTC-7, Peter Otten wrote: > Carl Banks wrote: > > > Is it possible to specify a zero-length switch? Here's what I mean. > > > > I have a use case where some users would have to enter a section name on > > the command line almost every time, whereas other u

Re: argparse zero-length switch

2011-10-15 Thread Steven D'Aprano
Carl Banks wrote: > So instead of typing this: > > sp subcommand -s abc foo bar > > they could type this: > > sp subcommand @abc foo bar > > Admittedly a small benefit. I would call it a *cost* and not a benefit at all. Instead of using a standard, familiar user interface for entering comman

Re: argparse zero-length switch

2011-10-14 Thread Ben Finney
Carl Banks writes: > I have a use case where some users would have to enter a section name > on the command line almost every time, whereas other users (the ones > using only one section) will never have to enter the section name. Sounds like a typical case where you want an option that takes an

Re: argparse zero-length switch

2011-10-14 Thread Peter Otten
Carl Banks wrote: > Is it possible to specify a zero-length switch? Here's what I mean. > > I have a use case where some users would have to enter a section name on > the command line almost every time, whereas other users (the ones using > only one section) will never have to enter the section

argparse zero-length switch

2011-10-13 Thread Carl Banks
Is it possible to specify a zero-length switch? Here's what I mean. I have a use case where some users would have to enter a section name on the command line almost every time, whereas other users (the ones using only one section) will never have to enter the section name. I don't want to burd