[ python-Bugs-1366250 ] incorrect documentation for optparse
SourceForge.net
noreply at sourceforge.net
Fri Nov 25 13:22:57 CET 2005
Bugs item #1366250, was opened at 2005-11-25 13:22
Message generated for change (Settings changed) made by popuptoaster
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1366250&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: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Michael Dunn (popuptoaster)
Assigned to: Nobody/Anonymous (nobody)
>Summary: incorrect documentation for optparse
Initial Comment:
The page
http://www.python.org/doc/current/lib/optparse-parsing-arguments.html
in the current documentation has text with an incorrect
example:
"""
6.21.3.7 Parsing arguments
The whole point of creating and populating an
OptionParser is to call its parse_args() method:
(options, args) = parser.parse_args(args=None,
options=None)
where the input parameters are
args
the list of arguments to process (sys.argv[1:] by
default)
options
object to store option arguments in (a new instance of
optparse.Values by default)
"""
The example should be changed to:
(options, args) = parser.parse_args(args=None,
values=None)
^^^^^^
And then there should be a correstponding substition
below in the explanation of the keyword arguments:
values
^^^^^^
object to store option arguments in (a new instance of
optparse.Values by default)
Cheers, Michael
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1366250&group_id=5470
More information about the Python-bugs-list
mailing list