[ python-Bugs-1366250 ] incorrect documentation for optparse

SourceForge.net noreply at sourceforge.net
Sun Jun 11 16:43:04 CEST 2006


Bugs item #1366250, was opened at 2005-11-25 07:22
Message generated for change (Comment added) made by gward
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: Python 2.5
>Status: Closed
>Resolution: Fixed
Priority: 5
Submitted By: Michael Dunn (popuptoaster)
Assigned to: Greg Ward (gward)
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

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

>Comment By: Greg Ward (gward)
Date: 2006-06-11 10:43

Message:
Logged In: YES 
user_id=14422

Actually, I prefer the terminology in the example code, and
think that the text is wrong.  So I fixed the text instead.
 Also made a few other small tweaks to this section.

Fixed upstream in Optik svn, rev 519.
Fix on Python trunk, rev 46860.


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

Comment By: Georg Brandl (birkenfeld)
Date: 2005-11-26 11:37

Message:
Logged In: YES 
user_id=1188172

Assigning to Greg as he maintains the upstream Optik
distribution.

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

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