4 ms·
List, Dict can be enriched with the type of objects they contain: e.g. List[int] or Dict[str, str]. Mapping is a type hint for any object that implements the _
by lou1306 8y ago
List, Dict can be enriched with the type of objects they contain: e.g. List[int] or Dict[str, str].
Mapping is a type hint for any object that implements the __getitem__ magic method (i.e. you can do `foo[bar]`).