
]c           @   sI   d  Z  d g Z d d l m Z d d l m Z d e f d     YZ d S(   s,   Class representing message/* MIME documents.t   MIMEMessagei(   t   message(   t   MIMENonMultipartc           B   s   e  Z d  Z d d  Z RS(   s,   Class representing message/* MIME documents.t   rfc822c         C   sX   t  j |  d |  t | t j  s4 t d   n  t j j |  |  |  j d  d S(   s  Create a message/* type MIME document.

        _msg is a message object and must be an instance of Message, or a
        derived class of Message, otherwise a TypeError is raised.

        Optional _subtype defines the subtype of the contained message.  The
        default is "rfc822" (this is defined by the MIME standard, even though
        the term "rfc822" is technically outdated by RFC 2822).
        R   s&   Argument is not an instance of Messages   message/rfc822N(   R   t   __init__t
   isinstanceR   t   Messaget	   TypeErrort   attacht   set_default_type(   t   selft   _msgt   _subtype(    (    s#   lib/python2.7/email/mime/message.pyR      s
    
(   t   __name__t
   __module__t   __doc__R   (    (    (    s#   lib/python2.7/email/mime/message.pyR       s   N(   R   t   __all__t   emailR   t   email.mime.nonmultipartR   R    (    (    (    s#   lib/python2.7/email/mime/message.pyt   <module>   s   	