[Python-Dev] Proposed standard module: Optik (original) (raw)

Guido van Rossum guido@python.org
Mon, 11 Feb 2002 11:40:35 -0500


I'd also be in favour of providing option parsing through getopt only. If getopt is not enough, extend it (in moderate ways, rather adding customization mechanisms instead of alternatives, etc). If that involves incorporating code from Optik, fine. However, I don't think the standard library should have two modules that do essentially the same thing; such scenarious will raise question whether one is better than the other and which of them is maintained.

I think Optik provides one key idea that makes it better: an options parser object that can be invoked multiple times and each time returns a new options object whose attributes are variables corresponding to various options.

I'd be happy to say that the old getopt.getopt() interface will be deprecated.

--Guido van Rossum (home page: http://www.python.org/~guido/)