(self, _factory=None, *, policy=compat32)
_factory is called with no arguments to create a new message obj

        The policy keyword specifies a policy object that controls a number of
        aspects of the parser's operation.  The default policy maintains
        backward compatibility.
_factory is called with no arguments to create a new message obj
_factory is called with no arguments to create a new message obj
def __init__(self, _factory=None, *, policy=compat32):
        """_factory is called with no arguments to create a new message obj

        The policy keyword specifies a policy object that controls a number of
        aspects of the parser's operation.  The default policy maintains
        backward compatibility.

        """
        self.policy = policy
        self._old_style_factory = False
        if _factory is None:
            if policy.message_factory is None:
                from email.message import Message
                self._factory = Message
            else:
                self._factory = policy.message_factory
        else:
            self._factory = _factory
            try:
                _factory(policy=self.policy)
            except TypeError:
                # Assume this is an old-style factory
                self._old_style_factory = True
        self._input = BufferedSubFile()
        self._msgstack = []
        self._parse = self._parsegen().__next__
        self._cur = None
        self._last = None
        self._headersonly = False
def __init__ ( self , _factory = None , * , policy = compat32 ) : self . policy = policy self . _old_style_factory = False if _factory is None : if policy . message_factory is None : from email . message import Message self . _factory = Message else : self . _factory = policy . message_factory else : self . _factory = _factory try : _factory ( policy = self . policy ) except TypeError : # Assume this is an old-style factory self . _old_style_factory = True self . _input = BufferedSubFile ( ) self . _msgstack = [ ] self . _parse = self . _parsegen ( ) . __next__ self . _cur = None self . _last = None self . _headersonly = False