class_docstr: Basic message object.
  
  A message object is defined as something that has a bunch of RFC 2822
  headers and a payload.  It may optionally have an envelope header
  (a.k.a. Unix-From or From_ header).  If the message is a container (i.e. a
  multipart or a message/rfc822), then the payload is a list of Message
  objects, otherwise it is a string.
  
  Message objects implement part of the `mapping' interface, which assumes
  there is exactly one occurrence of the header per message.  Some headers
  do in fact appear multiple times (e.g. Received) and for those headers,
  you must use the explicit API to set or get all the headers.  Not all of
  the mapping methods are implemented.
docstr: Extended header setting.
  
  name is the header field to add.  keyword arguments can be used to set
  additional parameters for the header field, with underscores converted
  to dashes.  Normally the parameter will be added as key="value" unless
  value is None, in which case only the key will be added.  If a
  parameter value contains non-ASCII characters it must be specified as a
  three-tuple of (charset, language, value), in which case it will be
  encoded according to RFC2231 rules.
  
  Example:
  
  msg.add_header('content-disposition', 'attachment', filename='bud.gif')
docstr_tok: ["Extended","header","setting",".","name","is","the","header","field","to","add",".","keyword","arguments","can","be","used","to","set","additional","parameters","for","the","header","field",",","with","underscores","converted","to","dashes",".","Normally","the","parameter","will","be","added","as","key=","''","value","''","unless","value","is","None",",","in","which","case","only","the","key","will","be","added",".","If","a","parameter","value","contains","non-ASCII","characters","it","must","be","specified","as","a","three-tuple","of","(","charset",",","language",",","value",")",",","in","which","case","it","will","be","encoded","according","to","RFC2231","rules",".","Example",":","msg.add_header","(","'content-disposition","'",",","'attachment","'",",","filename='bud.gif","'",")"]
code: def add_header(self, _name, _value, **_params):
      """Extended header setting.
  
      name is the header field to add.  keyword arguments can be used to set
      additional parameters for the header field, with underscores converted
      to dashes.  Normally the parameter will be added as key="value" unless
      value is None, in which case only the key will be added.  If a
      parameter value contains non-ASCII characters it must be specified as a
      three-tuple of (charset, language, value), in which case it will be
      encoded according to RFC2231 rules.
  
      Example:
  
      msg.add_header('content-disposition', 'attachment', filename='bud.gif')
      """
      parts = []
      for k, v in _params.items():
          if v is None:
              parts.append(k.replace("_", "-"))
          else:
              parts.append(_formatparam(k.replace("_", "-"), v))
      if _value is not None:
          parts.insert(0, _value)
      self._headers.append((_name, SEMISPACE.join(parts)))
  
imports: import re
  import uu
  import binascii
  import warnings
  from cStringIO import StringIO
  import email.charset
  from email import utils
  from email import errors
label_desc: Use image node_id 23 for calling the Message obj's underlying member method code with example usage: obj.add_header(_name, _value) without return types