getopt with negative numbers?
Ben Finney
bignose+hates-spam at benfinney.id.au
Sat Sep 29 19:58:03 EDT 2007
Carl Banks <pavlovevidence at gmail.com> writes:
> On Sep 28, 6:19 pm, Ben Finney <bignose+hates-s... at benfinney.id.au>
> wrote:
> > Steven Bethard <steven.beth... at gmail.com> writes:
> > > A user shouldn't have to go out of their way to specify regular
> > > numbers on the command line, regardless of whether they're
> > > positive or negative.
> >
> > A user shouldn't have to go out of their way to know whether what
> > they type on a command line will be treated as an option or an
> > argument.
>
> I guess typing
> ./program --help
>
> is out of the question.
You're trying to have it both ways.
You're saying the user "shouldn't have to go out of their way" to type
arbitrary arguments on the command line. Then, in your next message,
you suggest they must *read the detailed command-line help* in order
to know whether they *can* type arbitrary command-line arguments.
Is "learn about how the program expects options and arguments" within
your definition of "go out of their way", or isn't it? If it's not,
then "shouldn't have to go out of their way" is *not* an argument in
favour of special-casing negative-numbers.
--
\ "We spend the first twelve months of our children's lives |
`\ teaching them to walk and talk and the next twelve years |
_o__) telling them to sit down and shut up." -- Phyllis Diller |
Ben Finney
More information about the Python-list
mailing list