[ python-Bugs-1665333 ] Documentation missing for OptionGroup class in optparse

SourceForge.net noreply at sourceforge.net
Fri Mar 16 07:59:14 CET 2007


Bugs item #1665333, was opened at 2007-02-21 07:40
Message generated for change (Comment added) made by nnorwitz
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1665333&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Documentation
Group: Python 2.4
>Status: Closed
>Resolution: Invalid
Priority: 5
Private: No
Submitted By: LunarYorn (lunar_yorn)
Assigned to: Nobody/Anonymous (nobody)
Summary: Documentation missing for OptionGroup class in optparse 

Initial Comment:
Python seems to lack documentation for the OptionGroup class and related methods in the optparse modul.

In detail documentation of the following classes and methods in optparse is missing:

- OptionGroup
- OptionParser.add_option_group
- OptionParser.get_option_group

These classes and methods also lack docstrings.

I found this in Python 2.4.4c1 which comes with Ubuntu 6.10 Edgy. It seems, that Python 2.5 on Ubuntu Edgy also suffers from this bug.

----------------------------------------------------------------------

>Comment By: Neal Norwitz (nnorwitz)
Date: 2007-03-15 23:59

Message:
Logged In: YES 
user_id=33168
Originator: NO

LunarYorn, thanks for the report.  bediviere, thanks to for filing a
report with optik.  Since the issue  is tracked there, I'm closing this
report.

----------------------------------------------------------------------

Comment By: LunarYorn (lunar_yorn)
Date: 2007-02-26 09:45

Message:
Logged In: YES 
user_id=1485244
Originator: YES

Thanks for filing the patch there!  I didn't know, that optparse is
developt outside of Python...

Anyway I think you're right not to comment the whole api.  I did not
intend that.  I would be content with a little note in the docs quickly
explains OptionGroups and how to create them.  More shouldn't be told,
since they are only useful for formatting help output.

I just needed such a thing for my recent project and was short of
overwriting the OptionParser and HelpFormatter classes.  For that purpose I
looked into the sources, where I found the OptionGroup capabilities.  A
little note would have shortened the development of the option parsing code
quite a bit... ;)

----------------------------------------------------------------------

Comment By: Steven Bethard (bediviere)
Date: 2007-02-26 09:39

Message:
Logged In: YES 
user_id=945502
Originator: NO

Looks like the optparse docs are also auto-generated from optik. Here's
the first line of liboptparse.tex:

% THIS FILE IS AUTO-GENERATED!  DO NOT EDIT!

So I guess this needs to be handled in the optparse bugs.

----------------------------------------------------------------------

Comment By: Steven Bethard (bediviere)
Date: 2007-02-26 09:37

Message:
Logged In: YES 
user_id=945502
Originator: NO

The docstrings need to be modified in the Optik package (from which the
stdlib optparse module is derived). I've filed you an appropriate patch
there:
http://sourceforge.net/tracker/index.php?func=detail&aid=1669315&group_id=38019&atid=421097.
I'll see what I can do about adding some documentation. My preference is
only to document OptionParser.add_option_group -- I think making the
OptionGroup API public is a mistake (like making the STORE_ACTIONS, etc.
APIs public was).

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1665333&group_id=5470


More information about the Python-bugs-list mailing list