msg31302 - (view) |
Author: LunarYorn (lunar_yorn) |
Date: 2007-02-21 15:40 |
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. |
|
|
msg31303 - (view) |
Author: Steven Bethard (bethard) *  |
Date: 2007-02-26 17:37 |
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). |
|
|
msg31304 - (view) |
Author: Steven Bethard (bethard) *  |
Date: 2007-02-26 17:39 |
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. |
|
|
msg31305 - (view) |
Author: LunarYorn (lunar_yorn) |
Date: 2007-02-26 17:45 |
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... ;) |
|
|
msg31306 - (view) |
Author: Neal Norwitz (nnorwitz) *  |
Date: 2007-03-16 06:59 |
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. |
|
|
msg75845 - (view) |
Author: A.M. Kuchling (akuchling) *  |
Date: 2008-11-14 00:32 |
Re-opening, since Optik is no longer externally maintained. |
|
|
msg116613 - (view) |
Author: Mark Lawrence (BreamoreBoy) * |
Date: 2010-09-16 21:20 |
Should this be left with AMK or should it be reassigned to docs@python? |
|
|
msg116617 - (view) |
Author: Éric Araujo (eric.araujo) *  |
Date: 2010-09-16 21:32 |
Adding docs@ to nosy. amk: Please reassign to docs@ if you don’t intend to work on this. |
|
|
msg117459 - (view) |
Author: Sandro Tosi (sandro.tosi) *  |
Date: 2010-09-27 18:27 |
I will work on it, it noone objects. Cheers, Sandro |
|
|
msg117544 - (view) |
Author: Sandro Tosi (sandro.tosi) *  |
Date: 2010-09-28 20:14 |
Hello, attached is a patch to improve the OptionGroup documentation. I've also changed usage->Usage and options->Options in the examples output, since now the code tries to guess the lower case word and rewrites with the capitalized one. I'm willing to improve the patch in case there's something not good (and I bet there is, since it's my first complex patch for Python documentation) so please be nice :) and point me to parts that can be improved. Thanks in advance, Sandro |
|
|
msg117547 - (view) |
Author: Sandro Tosi (sandro.tosi) *  |
Date: 2010-09-28 20:34 |
sorry, I forgot to wrap at column 80, this patch just changes that. |
|
|
msg125040 - (view) |
Author: Sandro Tosi (sandro.tosi) *  |
Date: 2011-01-02 09:58 |
Could someone give a look to this patch? I can work on fixing the missing stuff (if any :)). |
|
|
msg125055 - (view) |
Author: Georg Brandl (georg.brandl) *  |
Date: 2011-01-02 14:23 |
Looks good, applied in r87627 (after removing stray tabs). |
|
|
msg132386 - (view) |
Author: Weeble (weeble) |
Date: 2011-03-28 08:45 |
I think the documentation for get_option_group is not right. I've created a new bug: http://bugs.python.org/issue11699 |
|
|