[ python-Bugs-1507379 ] Broken example in optparse module documentation

SourceForge.net noreply at sourceforge.net
Sat Jun 17 07:52:14 CEST 2006


Bugs item #1507379, was opened at 2006-06-16 08:34
Message generated for change (Comment added) made by nnorwitz
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1507379&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: 3rd Party
>Status: Closed
>Resolution: Invalid
Priority: 5
Submitted By: Michal Krenek (Mikos) (mikos01)
Assigned to: Nobody/Anonymous (nobody)
Summary: Broken example in optparse module documentation

Initial Comment:
I have found two bugs in optaparse module 
documentation. There is example code on 
http://docs.python.org/lib/optparse-callback-example-6.html, 
but it doesn't work.

First bug is that callback function is 
named 'vararg_callback', but in parser.add_option 
is 'callback=varargs' (so to fix it, that callback 
function must be renamed).

Second bug is that there is 
missing 'dest="some_destination"' argument in 
parser.add_option. Without it whole example doesn't 
work (it is throwing 'TypeError: attribute name must 
be string' exception).

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

>Comment By: Neal Norwitz (nnorwitz)
Date: 2006-06-16 22:52

Message:
Logged In: YES 
user_id=33168

Sorry, you must file a bug report with optik.

  http://sourceforge.net/projects/optik


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

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


More information about the Python-bugs-list mailing list