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

Fred L. Drake, Jr. fdrake at acm.org
Tue Oct 19 12:38:26 EDT 1999


Michael Zawrotny writes:
 > One way out of that trap (at least with the other p-lang's package
 > for options is to allow an optional integer argument whose
 > default is one for the -v flag.

Michael,
  It's those flags with optional arguments that hold the highest
possibility of confusion for users.  Is 'foo -v 1' a command with one
option and one parameter, or is it a command with one option that
takes a value?  If the value is optional, it's not clear.  I don't
know what the "right" way to deal with it is, perhaps, but not using
optional values for options seems the safest.


  -Fred

--
Fred L. Drake, Jr.	     <fdrake at acm.org>
Corporation for National Research Initiatives




More information about the Python-list mailing list