This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Broken example in optparse module documentation
Type: Stage:
Components: Documentation Versions:
process
Status: closed Resolution: not a bug
Dependencies: Superseder:
Assigned To: Nosy List: mikos01, nnorwitz
Priority: normal Keywords:

Created on 2006-06-16 15:34 by mikos01, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (2)
msg28819 - (view) Author: Michal Krenek (Mikos) (mikos01) Date: 2006-06-16 15:34
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).
msg28820 - (view) Author: Neal Norwitz (nnorwitz) * (Python committer) Date: 2006-06-17 05:52
Logged In: YES 
user_id=33168

Sorry, you must file a bug report with optik.

  http://sourceforge.net/projects/optik
History
Date User Action Args
2022-04-11 14:56:18adminsetgithub: 43516
2006-06-16 15:34:13mikos01create