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

Method get

Lib/email/message.py:506–516  ·  view source on GitHub ↗

Get a header value. Like __getitem__() but return failobj instead of None when the field is missing.

(self, name, failobj=None)

Source from the content-addressed store, hash-verified

504 for k, v in self._headers]
505
506 def get(self, name, failobj=None):
507 """Get a header value.
508
509 Like __getitem__() but return failobj instead of None when the field
510 is missing.
511 """
512 name = name.lower()
513 for k, v in self._headers:
514 if k.lower() == name:
515 return self.policy.header_fetch_parse(k, v)
516 return failobj
517
518 #
519 # "Internal" methods (public API, but only intended for use by a parser

Callers 15

get_payloadMethod · 0.95
__getitem__Method · 0.95
get_content_typeMethod · 0.95
_get_params_preserveMethod · 0.95
set_paramMethod · 0.95
del_paramMethod · 0.95
search_functionFunction · 0.45
_parsegenMethod · 0.45
__init__Method · 0.45
__getitem__Method · 0.45
is_attachmentMethod · 0.45

Calls 2

lowerMethod · 0.45
header_fetch_parseMethod · 0.45

Tested by

no test coverage detected