Ten Essential Development Practices

Michael Hoffman cam.ac.uk at mh391.invalid
Fri Jul 29 22:59:42 EDT 2005


Jorge Godoy wrote:
> Michael Hoffman wrote:
> 
> 
>>True, but a lot of his point *is* parsing input from the command line.
>>Consider the following points paraphrased from his article:
>>
>>* Don't mix multiple ways of specifying options. (Solved by optparse)
>>* If a flag expects an associated value, allow an optional = between the
>>flag and the value. (Solved by optparse)
>>* Allow single-letter options to be "bundled" after a single dash.
>>(Solved by optparse)
>>* Always allow -- as a file list marker. (Solved by optparse)
>>
>>And a lot of the other points are things that are made much, much,
>>simpler by optparse, to the point that they become somewhat obvious.
> 
> Take a look at the Perl module, then.  You'll see that all of these are also
> solved there "automagically".

In that case, I think he just wasted a lot of time in the article, and 
would have been better off saying "use Getopt::Long."
-- 
Michael Hoffman



More information about the Python-list mailing list