docstr: Parser of RFC 2822 and MIME email messages.
  
  Creates an in-memory object tree representing the email message, which
  can then be manipulated and turned over to a Generator to return the
  textual representation of the message.
  
  The string must be formatted as a block of RFC 2822 headers and header
  continuation lines, optionally preceded by a `Unix-from' header.  The
  header block is terminated either by the end of the string or by a
  blank line.
  
  _class is the class to instantiate for new message objects when they
  must be created.  This class must have a constructor that can take
  zero arguments.  Default is Message.Message.
code: def __init__(self, *args, **kws):
      """Parser of RFC 2822 and MIME email messages.
  
      Creates an in-memory object tree representing the email message, which
      can then be manipulated and turned over to a Generator to return the
      textual representation of the message.
  
      The string must be formatted as a block of RFC 2822 headers and header
      continuation lines, optionally preceded by a `Unix-from' header.  The
      header block is terminated either by the end of the string or by a
      blank line.
  
      _class is the class to instantiate for new message objects when they
      must be created.  This class must have a constructor that can take
      zero arguments.  Default is Message.Message.
      """
      if len(args) >= 1:
          if "_class" in kws:
              raise TypeError(
                  "Multiple values for keyword arg '_class'"
              )
          kws["_class"] = args[0]
      if len(args) == 2:
          if "strict" in kws:
              raise TypeError(
                  "Multiple values for keyword arg 'strict'"
              )
          kws["strict"] = args[1]
      if len(args) > 2:
          raise TypeError("Too many arguments")
      if "_class" in kws:
          self._class = kws["_class"]
          del kws["_class"]
      else:
          self._class = Message
      if "strict" in kws:
          warnings.warn(
              "'strict' argument is deprecated (and ignored)",
              DeprecationWarning,
              2,
          )
          del kws["strict"]
      if kws:
          raise TypeError("Unexpected keyword arguments")
  
file_path: catboost/contrib/tools/python/src/Lib/email/parser.py
imports: import warnings
  from cStringIO import StringIO
  from email.feedparser import FeedParser
  from email.message import Message
label_desc: Use image node_id 1 to create a new Parser object  with example: obj = Parser()