MCPcopy
hub / github.com/urllib3/urllib3 / __or__

Method __or__

src/urllib3/_collections.py:468–476  ·  view source on GitHub ↗
(self, other: object)

Source from the content-addressed store, hash-verified

466 return self
467
468 def __or__(self, other: object) -> Self:
469 # Supports merging header dicts using operator |
470 # combining items with add instead of __setitem__
471 maybe_constructable = ensure_can_construct_http_header_dict(other)
472 if maybe_constructable is None:
473 return NotImplemented
474 result = self.copy()
475 result.extend(maybe_constructable)
476 return result
477
478 def __ror__(self, other: object) -> Self:
479 # Supports merging header dicts using operator | when other is on left side

Callers

nothing calls this directly

Calls 3

copyMethod · 0.95
extendMethod · 0.80

Tested by

no test coverage detected