def set_param(self, param, value, header='Content-Type', requote=True,
                  charset=None, language=''):
        if not isinstance(value, tuple) and charset:
            value = (charset, language, value)

        if not self.has_key(header) and header.lower() == 'content-type':
            ctype = 'text/plain'
        else:
            ctype = self.get(header)
        if not self.get_param(param, header=header):
            if not ctype:
                ctype = _formatparam(param, value, requote)
            else:
                ctype = SEMISPACE.join(
                    [ctype, _formatparam(param, value, requote)])
        else:
            ctype = ''
            for old_param, old_value in self.get_params(header=header,
                                                        unquote=requote):
                append_param = ''
                if old_param.lower() == param.lower():
                    append_param = _formatparam(param, value, requote)
                else:
                    append_param = _formatparam(old_param, old_value, requote)
                if not ctype:
                    ctype = append_param
                else:
                    ctype = SEMISPACE.join([ctype, append_param])
        if ctype <> self.get(header):
            del self[header]
            self[header] = ctype
Construct a derived feature.
dataset/ETHPy150Open babble/babble/include/jython/Lib/email/message.py/Message.set_param--crossover with--dataset/ETHPy150Open alex-pirozhenko/sklearn-pmml/sklearn_pmml/convert/features.py/DerivedFeature.__init__