Construct a Map from a Python mapping.
(self, input_dict: Mapping[K, V])
| 558 | return _ffi_api.DeepCopy(self) |
| 559 | |
| 560 | def __init__(self, input_dict: Mapping[K, V]) -> None: |
| 561 | """Construct a Map from a Python mapping.""" |
| 562 | list_kvs: list[Any] = [] |
| 563 | for k, v in input_dict.items(): |
| 564 | list_kvs.append(k) |
| 565 | list_kvs.append(v) |
| 566 | self.__init_handle_by_constructor__(_ffi_api.Map, *list_kvs) |
| 567 | |
| 568 | def __getitem__(self, k: K) -> V: |
| 569 | """Return the value for key `k` or raise KeyError.""" |