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

Method get_params

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

Return the message's Content-Type parameters, as a list. The elements of the returned list are 2-tuples of key/value pairs, as split on the `=' sign. The left hand side of the `=' is the key, while the right hand side is the value. If there is no `=' sign in t

(self, failobj=None, header='content-type', unquote=True)

Source from the content-addressed store, hash-verified

671 return params
672
673 def get_params(self, failobj=None, header='content-type', unquote=True):
674 """Return the message's Content-Type parameters, as a list.
675
676 The elements of the returned list are 2-tuples of key/value pairs, as
677 split on the `=' sign. The left hand side of the `=' is the key,
678 while the right hand side is the value. If there is no `=' sign in
679 the parameter the value is the empty string. The value is as
680 described in the get_param() method.
681
682 Optional failobj is the object to return if there is no Content-Type
683 header. Optional header is the header to search instead of
684 Content-Type. If unquote is True, the value is unquoted.
685 """
686 missing = object()
687 params = self._get_params_preserve(missing, header)
688 if params is missing:
689 return failobj
690 if unquote:
691 return [(k, _unquotevalue(v)) for k, v in params]
692 else:
693 return params
694
695 def get_param(self, param, failobj=None, header='content-type',
696 unquote=True):

Callers 3

set_paramMethod · 0.95
del_paramMethod · 0.95
set_typeMethod · 0.95

Calls 2

_get_params_preserveMethod · 0.95
_unquotevalueFunction · 0.85

Tested by

no test coverage detected