News for hackers. Stuff that matters.
Re:Type hints cheat sheet (Python 3) by lou1306 on Wednesday December 12, 2018 @05:30AM (#18662726)
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]`).

There are no comments on this comment yet.