[New-bugs-announce] [issue8158] documentation of 'optparse' module incomplete

Simon Anders report at bugs.python.org
Tue Mar 16 19:21:07 CET 2010


New submission from Simon Anders <anders at embl.de>:

The class optparse.OptionParser supports a number of useful keyword arguments to the initializer, which are not documented in the Python Standard Library documentation, here: http://docs.python.org/library/optparse.html

This is a bit unfortunate. For example, I wanted to add a description to the top of my script's help page and a copyright notice to the foot, and was already about to subclass OptionParser in order to override the format_help method, when I noticed that optional keyword arguments 'description' and 'epilog' are provided for precisely this purpose.

The 'epilog' attribute is at least mentioned in the class's docstring, while the 'description' argument is completely undocumented. I doubt that this was done on purpose.

I'd suggest to go over the documentation page for optparse and fill in the missing bits; at minimum, list all keyword arguments to optparse.OptionParser.__init__.

----------
assignee: georg.brandl
components: Documentation
messages: 101177
nosy: georg.brandl, sanders
severity: normal
status: open
title: documentation of 'optparse' module incomplete
versions: Python 2.6

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue8158>
_______________________________________


More information about the New-bugs-announce mailing list