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

Method __or__

starlette/datastructures.py:620–625  ·  view source on GitHub ↗
(self, other: Mapping[str, str])

Source from the content-addressed store, hash-verified

618 return self
619
620 def __or__(self, other: Mapping[str, str]) -> MutableHeaders:
621 if not isinstance(other, Mapping):
622 raise TypeError(f"Expected a mapping but got {other.__class__.__name__}")
623 new = self.mutablecopy()
624 new.update(other)
625 return new
626
627 @property
628 def raw(self) -> list[tuple[bytes, bytes]]:

Callers

nothing calls this directly

Calls 2

mutablecopyMethod · 0.80
updateMethod · 0.45

Tested by

no test coverage detected