getopt: where's da dicts?????

D'Arcy J.M. Cain darcy at vex.net
Wed Oct 20 16:06:46 EDT 1999


Fred L. Drake, Jr. <fdrake at acm.org> wrote:
> D'Arcy J.M. Cain writes:
>  > It is possible to add optional arguments without messing up regular
>  > use.  You just have to put restrictions on the use of flags that
>  > take optional arguments but that's fine in an extension anyway.  See

>   Perhaps it's not enough of a problem; I'm thinking of the case where 
> the applications command-line UI is "extended" by making a required
> value optional.  What was once:

>       myprog -f value

> would no longer work if the value for -f became optional and required

Right.  I am assuming that no one would change the behaviour of existing
options.  If someone were to switch to this function I would expect that
they would use the extra functionality for new options and mention the
new usage in the instructions.  The existing commands would work as they
now do.  It's only the new, optional arguments that would require a small
attitude adjustment on the part of the user.

I agree that changing expected behaviour gratuitously is a bad thing.

-- 
D'Arcy J.M. Cain <darcy at caingang.com>      |  Democracy is three wolves
http://www.druid.net/darcy/                |  and a sheep voting on         
+1 416 425 1212     (DoD#0082)    (eNTP)   |  what's for dinner.




More information about the Python-list mailing list