Home
last modified time | relevance | path

Searched refs:preferencelist (Results 1 – 4 of 4) sorted by relevance

/third_party/python/Lib/test/test_email/
Dtest_message.py457 self.assertEqual(m.get_body(preferencelist=(
460 self.assertEqual(m.get_body(preferencelist=('related', 'html')),
462 self.assertEqual(m.get_body(preferencelist=('related', 'plain')),
464 self.assertEqual(m.get_body(preferencelist=('html', 'plain')),
466 self.assertEqual(m.get_body(preferencelist=['related']),
468 self.assertEqual(m.get_body(preferencelist=['html']), expected[html])
469 self.assertEqual(m.get_body(preferencelist=['plain']), expected[plain])
470 self.assertEqual(m.get_body(preferencelist=('plain', 'html')),
472 self.assertEqual(m.get_body(preferencelist=('plain', 'related')),
474 self.assertEqual(m.get_body(preferencelist=('html', 'related')),
[all …]
/third_party/python/Lib/email/
Dmessage.py977 def _find_body(self, part, preferencelist): argument
982 if subtype in preferencelist:
983 yield (preferencelist.index(subtype), part)
989 yield from self._find_body(subpart, preferencelist)
991 if 'related' in preferencelist:
992 yield (preferencelist.index('related'), part)
1004 yield from self._find_body(candidate, preferencelist)
1006 def get_body(self, preferencelist=('related', 'html', 'plain')): argument
1016 best_prio = len(preferencelist)
1018 for prio, part in self._find_body(self, preferencelist):
/third_party/python/Doc/includes/
Demail-read-alternative.py28 simplest = msg.get_body(preferencelist=('plain', 'html'))
50 body = richest.get_body(preferencelist=('html'))
/third_party/python/Doc/library/
Demail.message.rst536 .. method:: get_body(preferencelist=('related', 'html', 'plain'))
541 *preferencelist* must be a sequence of strings from the set ``related``,
548 If ``related`` is not included in *preferencelist*, consider the root
561 *preferencelist*, return ``None``.
563 Notes: (1) For most applications the only *preferencelist* combinations
568 *preferencelist* has a non-default value. (3) Messages (or message parts)