def add(self, key, value): MimeHeaders.add(self, key, value) self._m[key] = headers.to_mime(normalize(key), remove_newlines(value))
def __delitem__(self, key): MimeHeaders.__delitem__(self, key) del self._m[key]
def prepend(self, key, value): MimeHeaders.prepend(self, key, value) self._m._headers.insert(0, (normalize(key), remove_newlines(value)))
def __init__(self, message): MimeHeaders.__init__(self, [(k, _try_decode(k, v)) for k, v in list(message.items())]) self._m = message
def __setitem__(self, key, value): MimeHeaders.__setitem__(self, key, value) del self._m[key] self._m[key] = remove_newlines(value)
def __init__(self, message): MimeHeaders.__init__(self, [(k, _try_decode(k, v)) for k, v in message.items()]) self._m = message