parameters: (self, s=None, charset=None,
                   maxlinelen=None, header_name=None,
                   continuation_ws=' ', errors='strict')
docstring: Create a MIME-compliant header that can contain many character sets.
  
          Optional s is the initial header value.  If None, the initial header
          value is not set.  You can later append to the header with .append()
          method calls.  s may be a byte string or a Unicode string, but see the
          .append() documentation for semantics.
  
          Optional charset serves two purposes: it has the same meaning as the
          charset argument to the .append() method.  It also sets the default
          character set for all subsequent .append() calls that omit the charset
          argument.  If charset is not provided in the constructor, the us-ascii
          charset is used both as s's initial charset and as the default for
          subsequent .append() calls.
  
          The maximum line length can be specified explicit via maxlinelen.  For
          splitting the first line to a shorter value (to account for the field
          header which isn't included in s, e.g. `Subject') pass in the name of
          the field in header_name.  The default maxlinelen is 76.
  
          continuation_ws must be RFC 2822 compliant folding whitespace (usually
          either a space or a hard tab) which will be prepended to continuation
          lines.
  
          errors is passed through to the .append() call.
docstring_summary: Create a MIME-compliant header that can contain many character sets.
docstring_tokens: Create a MIME - compliant header that can contain many character sets .
function: def __init__(self, s=None, charset=None,
                   maxlinelen=None, header_name=None,
                   continuation_ws=' ', errors='strict'):
          """Create a MIME-compliant header that can contain many character sets.
  
          Optional s is the initial header value.  If None, the initial header
          value is not set.  You can later append to the header with .append()
          method calls.  s may be a byte string or a Unicode string, but see the
          .append() documentation for semantics.
  
          Optional charset serves two purposes: it has the same meaning as the
          charset argument to the .append() method.  It also sets the default
          character set for all subsequent .append() calls that omit the charset
          argument.  If charset is not provided in the constructor, the us-ascii
          charset is used both as s's initial charset and as the default for
          subsequent .append() calls.
  
          The maximum line length can be specified explicit via maxlinelen.  For
          splitting the first line to a shorter value (to account for the field
          header which isn't included in s, e.g. `Subject') pass in the name of
          the field in header_name.  The default maxlinelen is 76.
  
          continuation_ws must be RFC 2822 compliant folding whitespace (usually
          either a space or a hard tab) which will be prepended to continuation
          lines.
  
          errors is passed through to the .append() call.
          """
          if charset is None:
              charset = USASCII
          if not isinstance(charset, Charset):
              charset = Charset(charset)
          self._charset = charset
          self._continuation_ws = continuation_ws
          cws_expanded_len = len(continuation_ws.replace('\t', SPACE8))
          # BAW: I believe `chunks' and `maxlinelen' should be non-public.
          self._chunks = []
          if s is not None:
              self.append(s, charset, errors)
          if maxlinelen is None:
              maxlinelen = MAXLINELEN
          if header_name is None:
              # We don't know anything about the field header so the first line
              # is the same length as subsequent lines.
              self._firstlinelen = maxlinelen
          else:
              # The first line should be shorter to take into account the field
              # header.  Also subtract off 2 extra for the colon and space.
              self._firstlinelen = maxlinelen - len(header_name) - 2
          # Second and subsequent lines should subtract off the length in
          # columns of the continuation whitespace prefix.
          self._maxlinelen = maxlinelen - cws_expanded_len
function_tokens: def __init__ ( self , s = None , charset = None , maxlinelen = None , header_name = None , continuation_ws = ' ' , errors = 'strict' ) : if charset is None : charset = USASCII if not isinstance ( charset , Charset ) : charset = Charset ( charset ) self . _charset = charset self . _continuation_ws = continuation_ws cws_expanded_len = len ( continuation_ws . replace ( '\t' , SPACE8 ) ) # BAW: I believe `chunks' and `maxlinelen' should be non-public. self . _chunks = [ ] if s is not None : self . append ( s , charset , errors ) if maxlinelen is None : maxlinelen = MAXLINELEN if header_name is None : # We don't know anything about the field header so the first line # is the same length as subsequent lines. self . _firstlinelen = maxlinelen else : # The first line should be shorter to take into account the field # header.  Also subtract off 2 extra for the colon and space. self . _firstlinelen = maxlinelen - len ( header_name ) - 2 # Second and subsequent lines should subtract off the length in # columns of the continuation whitespace prefix. self . _maxlinelen = maxlinelen - cws_expanded_len