MCPcopy Create free account
hub / github.com/EasyIME/PIME / add

Method add

python/python3/tornado/httputil.py:135–145  ·  view source on GitHub ↗

Adds a new value for the given key.

(self, name: str, value: str)

Source from the content-addressed store, hash-verified

133 # new public methods
134
135 def add(self, name: str, value: str) -> None:
136 """Adds a new value for the given key."""
137 norm_name = _normalize_header(name)
138 self._last_key = norm_name
139 if norm_name in self:
140 self._dict[norm_name] = (
141 native_str(self[norm_name]) + "," + native_str(value)
142 )
143 self._as_list[norm_name].append(value)
144 else:
145 self[norm_name] = value
146
147 def get_list(self, name: str) -> List[str]:
148 """Returns all values for the given header as a list."""

Callers 15

__call__Method · 0.95
__init__Method · 0.95
parse_lineMethod · 0.95
test_copyMethod · 0.95
test_pickle_roundtripMethod · 0.95
test_stringMethod · 0.95
saFunction · 0.45
FaFunction · 0.45
bind_socketsFunction · 0.45
try_connectMethod · 0.45
watchFunction · 0.45

Calls 2

_normalize_headerFunction · 0.85
appendMethod · 0.45

Tested by 6

test_copyMethod · 0.76
test_pickle_roundtripMethod · 0.76
test_stringMethod · 0.76
get_and_headMethod · 0.36
test_distinct_tokensMethod · 0.36
test_refresh_tokenMethod · 0.36