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

Method get_all

Lib/email/message.py:541–557  ·  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, failobj is

(self, name, failobj=None)

Source from the content-addressed store, hash-verified

539 #
540
541 def get_all(self, name, failobj=None):
542 """Return a list of all the values for the named field.
543
544 These will be sorted in the order they appeared in the original
545 message, and may contain duplicates. Any fields deleted and
546 re-inserted are always appended to the header list.
547
548 If no such fields exist, failobj is returned (defaults to None).
549 """
550 values = []
551 name = name.lower()
552 for k, v in self._headers:
553 if k.lower() == name:
554 values.append(self.policy.header_fetch_parse(k, v))
555 if not values:
556 return failobj
557 return values
558
559 def add_header(self, _name, _value, **_params):
560 """Extended header setting.

Callers 10

transformMethod · 0.95
send_messageMethod · 0.45
getheaderMethod · 0.45
make_cookiesMethod · 0.45
_check_sampleMethod · 0.45
test_get_allMethod · 0.45
http_error_auth_reqedMethod · 0.45

Calls 3

lowerMethod · 0.45
appendMethod · 0.45
header_fetch_parseMethod · 0.45

Tested by 5

_check_sampleMethod · 0.36
test_get_allMethod · 0.36