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 cjw296
Recipients cjw296
Date 2007-10-06.16:03:10
SpamBayes Score 0.044092257
Marked as misclassified No
Message-id <1191686592.38.0.384749327692.issue1243@psf.upfronthosting.co.za>
In-reply-to
Content
The attached script demonstrates the bug.

option.dest should be set, even if not explicitly supplied in the call
to parser.add_option, by the time the callback is called.

Unless dest='something' is specified in the call to add_option, you will
get the following error when running "python test.py --myopt":

  File "test.py", line 4, in mycallback
    setattr(parser.values,option.dest,value)
TypeError: attribute name must be string

...as options.dest is still None.

I would expect options.dest to be computed as per the algorithm in
optparse.Option._check_dest.
Files
File name Uploaded
test.py cjw296, 2007-10-06.16:03:11
History
Date User Action Args
2007-10-06 16:03:13cjw296setspambayes_score: 0.0440923 -> 0.044092257
recipients: + cjw296
2007-10-06 16:03:12cjw296setspambayes_score: 0.0440923 -> 0.0440923
messageid: <1191686592.38.0.384749327692.issue1243@psf.upfronthosting.co.za>
2007-10-06 16:03:12cjw296linkissue1243 messages
2007-10-06 16:03:11cjw296create