'Set an option.  Extend ConfigParser.set: check for string values.'

def set(self, section, option, value=None):

    if ((self._optcre is self.OPTCRE) or value):
        if (not isinstance(value, basestring)):
            raise TypeError('option    values    must    be    strings')
    if (value is not None):
        tmp_value = value.replace('%%', '')
        tmp_value = self._interpvar_re.sub('', tmp_value)
        if ('%' in tmp_value):
            raise ValueError(('invalid    interpolation    syntax    in    %r    at    position    %d' % (value, tmp_value.find('%'))))
    ConfigParser.set(self, section, option, value)
