Ben Finney wrote: > Casey <[EMAIL PROTECTED]> writes: > >> Well, it is a hack and certainly not as clean as having getopt or >> optparse handle this natively (which I believe they should). > > I believe they shouldn't because the established interface is that a > hyphen always introduced an option unless (for those programs that > support it) a '--' option is used, as discussed.
I don't agree. First of all, what is 'established interface'? There are precedents from well-known C and C++ libraries, such as 'getopt', 'popt', and boost::program_options. IIRC, each of these will treat a negative number following an option that requires a number as a number. Besides this, the behavior I just described is really required. Otherwise, numeric options are basically broken. -- http://mail.python.org/mailman/listinfo/python-list