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.

Author meyerowitz
Recipients georg.brandl, meyerowitz
Date 2008-06-05.03:14:34
SpamBayes Score 0.008040324
Marked as misclassified No
Message-id <1212635679.53.0.642286486593.issue3040@psf.upfronthosting.co.za>
In-reply-to
Content
There are two minor bugs in the example in:
http://docs.python.org/lib/optparse-callback-example-6.html

For the optparse example documentation, the call to parser.add_option is
listed as:

parser.add_option("-c", "--callback",
                  action="callback", callback=varargs)

this has two bugs:
  1. It refers to the wrong function name
  2. It needs to have a dest variable defined, b/c the callback function
operates on that.

This can be fixed if the parser.add_option call is changed to:
parser.add_option("-c", "--callback",
      action="callback", dest="foo", callback=varargs_callback)
History
Date User Action Args
2008-06-05 03:14:40meyerowitzsetspambayes_score: 0.00804032 -> 0.008040324
recipients: + meyerowitz, georg.brandl
2008-06-05 03:14:39meyerowitzsetspambayes_score: 0.00804032 -> 0.00804032
messageid: <1212635679.53.0.642286486593.issue3040@psf.upfronthosting.co.za>
2008-06-05 03:14:38meyerowitzlinkissue3040 messages
2008-06-05 03:14:37meyerowitzcreate