MCPcopy Create free account
hub / github.com/RT-Thread/env-windows / get_all

Method get_all

tools/python-3.11.9-amd64/Lib/email/message.py:525–541  ·  view source on GitHub ↗

Return a list of all the values for the named field. These will be sorted in the order they appeared in the original message, and may contain duplicates. Any fields deleted and re-inserted are always appended to the header list. If no such fields exist, failo

(self, name, failobj=None)

Source from the content-addressed store, hash-verified

523 #
524
525 def get_all(self, name, failobj=None):
526 """Return a list of all the values for the named field.
527
528 These will be sorted in the order they appeared in the original
529 message, and may contain duplicates. Any fields deleted and
530 re-inserted are always appended to the header list.
531
532 If no such fields exist, failobj is returned (defaults to None).
533 """
534 values = []
535 name = name.lower()
536 for k, v in self._headers:
537 if k.lower() == name:
538 values.append(self.policy.header_fetch_parse(k, v))
539 if not values:
540 return failobj
541 return values
542
543 def add_header(self, _name, _value, **_params):
544 """Extended header setting.

Callers 8

transformMethod · 0.95
transformMethod · 0.95
send_messageMethod · 0.45
getheaderMethod · 0.45
make_cookiesMethod · 0.45
run_cgiMethod · 0.45
_read_listMethod · 0.45
http_error_auth_reqedMethod · 0.45

Calls 3

lowerMethod · 0.45
appendMethod · 0.45
header_fetch_parseMethod · 0.45

Tested by

no test coverage detected