MCPcopy
hub / github.com/encode/starlette / update

Method update

starlette/datastructures.py:367–375  ·  view source on GitHub ↗
(
        self,
        *args: MultiDict | Mapping[Any, Any] | list[tuple[Any, Any]],
        **kwargs: Any,
    )

Source from the content-addressed store, hash-verified

365 self._dict[key] = value
366
367 def update(
368 self,
369 *args: MultiDict | Mapping[Any, Any] | list[tuple[Any, Any]],
370 **kwargs: Any,
371 ) -> None:
372 value = MultiDict(*args, **kwargs)
373 existing_items = [(k, v) for (k, v) in self._list if k not in value.keys()]
374 self._list = existing_items + value.multi_items()
375 self._dict.update(value)
376
377
378class QueryParams(ImmutableMultiDict[str, str]):

Callers 15

include_query_paramsMethod · 0.95
test_multidictFunction · 0.95
cookiesMethod · 0.45
TemplateResponseMethod · 0.45
__call__Method · 0.45
matchesMethod · 0.45
matchesMethod · 0.45
matchesMethod · 0.45
matchesMethod · 0.45
lifespanMethod · 0.45
appMethod · 0.45
__or__Method · 0.45

Calls 3

MultiDictClass · 0.85
multi_itemsMethod · 0.80
keysMethod · 0.45

Tested by 4

test_multidictFunction · 0.76
test_request_clientFunction · 0.36
sendFunction · 0.36
update_sessionFunction · 0.36