[Python-Dev] Re: [getopt-sig] Adding Optik to the standard library

Guido van Rossum guido@python.org
Thu, 30 May 2002 14:41:58 -0400


> How about "OptParser" (alternatives: OptionsParser, OptsParser) as
> an analogue to the existing ConfigParser? They do go together, both
> conceptually and in practice, after all.

A decent guideline is to use the dominant class name as the module
name.  That would be OptionParser.  Then, instead of

    from optik import OptionParser

we'd be writing

    from OptionParser import OptionParser

I like this!

This works best if it is a single file; making OptionParser a package
would just complicate things.  So maybe I should take Greg up on his
offer to refactor the code into a single .py file.

(Barry prefers that there's only one class per file; fortunately I
don't have that hangup. :-)

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