If it were the job of the Handler, then it is wasted turning "str" into 
str instead of converting a str into a list or something else.
In my mind we would only convert python primitive types. So it would be 
perfectly general. At no point do we indicate that those are allowed 
types, but if InterfaceInputOption were to see a "str" it would just 
convert it into str and then its the job of the actual Interface to 
decide if str is an ok type.

On 11/24/2013 02:39 PM, Jai Ram Rideout wrote:
>
> In pyqi/core/interfaces/HTMLInterface/__init__.py:
>
> > +        self.FileExtension = FileExtension
> > +        self.FilenameLookup = FilenameLookup
> > +        self.DefaultFilename = DefaultFilename
> > +        self.ResultType = 'download'
> > +
> > +
> > +class HTMLPage(HTMLInterfaceResult):
> > +    def __init__(self, MIMEType='text/html', **kwargs):
> > +        super(HTMLPage, self).__init__(**kwargs)
> > +        self.MIMEType = MIMEType;
> > +        self.ResultType = 'page'
> > +
> > +
> > +class HTMLInterfaceOption(InterfaceInputOption):
> > +
> > +    api_mapping = {
>
> That's an interesting idea, though I'm not sure if we should push the 
> code all the way up into |InterfaceInputOption|, mainly because that 
> is meant to be very general and not specific to optparse, argparse, 
> HTML, etc.. Shouldn't this mapping be the job of the option's 
> |Handler| (which translates an interface input into the type expected 
> by the Command)?
>
> @wasade <https://github.com/wasade> what do you think?
>
> —
> Reply to this email directly or view it on GitHub 
> <https://github.com/bipy/pyqi/pull/203/files#r7880358>.
>