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 draghuram
Recipients cjw296, draghuram, gvanrossum
Date 2007-10-08.14:47:55
SpamBayes Score 0.11937779
Marked as misclassified No
Message-id <2c51ecee0710080747q20e7b5l5ba67fef9d53da03@mail.gmail.com>
In-reply-to <1191853954.3.0.774470947607.issue1243@psf.upfronthosting.co.za>
Content
>
> But what type should I specify?
>
> I was using a callback to get a datetime object as an option...
>

If you are looking for a new type of option than what are already
supported (string, int, long, choice, float and complex), you need to
extend optparse (there is a section for that). I personally prefer a
simple approach where the option value is taken as a string and any
processing is done on the value to convert to what ever type of object
one wants. For example, in this case, you can convert a string, say,
2007-10-8, internally to a datetime object.
History
Date User Action Args
2007-10-08 14:47:56draghuramsetspambayes_score: 0.119378 -> 0.11937779
recipients: + draghuram, gvanrossum, cjw296
2007-10-08 14:47:56draghuramlinkissue1243 messages
2007-10-08 14:47:55draghuramcreate