Bugs item #1507379, was opened at 2006-06-16 17:34
Message generated for change (Tracker Item Submitted) made by Item Submitter
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: None
Status: Open
Resolution: None
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).

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

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1507379&group_id=5470
_______________________________________________
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to