- class type_param_demo.Map[K, V][source]
Maps keys of type
K
to values of typeV
.Constructors¶
- Map()[source]
- Map(items: Mapping[K, V])
- Map(items: Iterable[tuple[K, V]])
Construct from the specified items.
Public members¶
- values() -> ValuesView[V][source]
Return a dynamic view of the values.
- get(key: K) -> V | None[source]
- get(key: K, default: V) -> V
- get[T](key: K, default: T) -> V | T
Return the mapped value, or the specified default.
- __delitem__(key: K)[source]
Remove the value associated with the specified key.
Last update:
Nov 16, 2024