MCPcopy
hub / github.com/pallets/werkzeug / __init__

Method __init__

src/werkzeug/datastructures/structures.py:600–621  ·  view source on GitHub ↗
(
        self,
        mapping: (
            MultiDict[K, V]
            | cabc.Mapping[K, V | list[V] | tuple[V, ...] | set[V]]
            | cabc.Iterable[tuple[K, V]]
            | None
        ) = None,
    )

Source from the content-addressed store, hash-verified

598 """
599
600 def __init__(
601 self,
602 mapping: (
603 MultiDict[K, V]
604 | cabc.Mapping[K, V | list[V] | tuple[V, ...] | set[V]]
605 | cabc.Iterable[tuple[K, V]]
606 | None
607 ) = None,
608 ) -> None:
609 import warnings
610
611 warnings.warn(
612 "'OrderedMultiDict' is deprecated and will be removed in Werkzeug"
613 " 3.2. Use 'MultiDict' instead.",
614 DeprecationWarning,
615 stacklevel=2,
616 )
617 super().__init__()
618 self._first_bucket: _omd_bucket[K, V] | None = None
619 self._last_bucket: _omd_bucket[K, V] | None = None
620 if mapping is not None:
621 self.update(mapping)
622
623 def __eq__(self, other: object) -> bool:
624 if not isinstance(other, MultiDict):

Callers

nothing calls this directly

Calls 2

updateMethod · 0.95
__init__Method · 0.45

Tested by

no test coverage detected