Some questions/suggestions
[email protected] Mon, 02 Dec 2002 01:54:29 -0700
| Newsgroups | gmane.comp.python.optik.user |
|---|---|
| Message-ID | <[email protected]> |
I'm working on the LaTeX documentation and unit tests for Optik in the
standard library, and although it was quite easy, I still have some
questions.
I'm not sure why the following functions/variables are not in classes, where
they seem to fit naturally:
- _match_abbrev and get_prog_name in the OptionParser class.
- check_builtin, check_choice and _builtin_cvt in the Option class.
- _create_option_mappings in OptionParser
- share_option_mappings in OptionGroup
What to do with options created without a dest that contain characters not
in valid python identifiers? In long options, '-' is converted to '_', but
that's the only conversion done. When I create an Option class with
Option('-%'), the Values.% attribute does get set, but I have to access it
through Values.__dict__ to get it (I was surprised that Python allows these
identifiers in the __dict__).
What are the read_file and read_module methods in the Values class for? I
can see what they do, I just couldn't think up a usecase.
Why doesn't OptionParser subclass from OptionGroup? I can see some problems
with the current implementation, but I view an OptionParser as the root
OptionGroup, not as some separate identity.
And the final question: will Optik be packaged up separately after inclusion
in 2.3? Although I've converted the docs to LaTeX and the tests to unittest,
I'm not willing to do this again and again for new Optik releases. If Optik
is released separately, I think it would be a good idea to adopt the same
tests and docs as in the standard library.
Johannes Gijsbers
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf