[getopt-sig] there isn't really any discussion here

Greg Ward gward@python.net
Wed, 13 Feb 2002 15:57:02 -0500


On 13 February 2002, Russ Cox said:
> What I've learned from getopt-sig is that the world appears to be
> divided in two.

Yep, that's pretty clear.  About the only thing we disagree on is
personal preference.

> It's not clear that one group is right and one group is wrong.  I
> think it's basically a difference of opinion about what constitutes
> the best approach to the problem.  Unfortunately I don't see any good
> way to sate both groups simultaneously.  I am ready to admit defeat.
> Perhaps it is worth having both approaches in the standard library, as
> IterGetopt and ObjectGetopt, or something like that.  Perhaps not.

I've been thinking along those lines myself.  I think I'd call them
OptionParser and OptionIterator, but never mind.  I plan to do some
experimental hacking-up of the Optik code to see if a simple iterator
interface can be ripped out of OptionParser, with all the bondage and
discipline that I like dropped on the floor.  It might just be possible
to please everyone.

> I admit to being somewhat disheartened by the recurring cries for
> supposed features like ``optional arguments'' (which introduce parsing
> ambiguities) and ``mandatory options'' (a contradiction in terms).

I mostly agree.  I admit to wanting "optional arguments" for some
applications, but I fear the ambiguity.  I totally agree about "required
options".

> I did gain something from all this, namely that I now have an
> argument parser that is simpler to use than the current getopt.
> Now I won't need to consult the getopt documentation every
> time I write a main() function.  For that I am quite grateful.

Cool!  Can you put your code on the web somewhere and post a URL?

        Greg
-- 
Greg Ward - geek-at-large                               gward@python.net
http://starship.python.net/~gward/
I'm on a strict vegetarian diet -- I only eat vegetarians.