MCPcopy Index your code
hub / github.com/python/cpython / _new_message

Method _new_message

Lib/email/feedparser.py:197–208  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

195 return root
196
197 def _new_message(self):
198 if self._old_style_factory:
199 msg = self._factory()
200 else:
201 msg = self._factory(policy=self.policy)
202 if self._cur and self._cur.get_content_type() == 'multipart/digest':
203 msg.set_default_type('message/rfc822')
204 if self._msgstack:
205 self._msgstack[-1].attach(msg)
206 self._msgstack.append(msg)
207 self._cur = msg
208 self._last = msg
209
210 def _pop_message(self):
211 retval = self._msgstack.pop()

Callers 1

_parsegenMethod · 0.95

Calls 5

_factoryMethod · 0.80
get_content_typeMethod · 0.80
set_default_typeMethod · 0.80
attachMethod · 0.45
appendMethod · 0.45

Tested by

no test coverage detected