Re:Things I Was Wrong About: Types
by throwaway894345 on Sunday September 27, 2020 @11:45PM
(#24612764)
Untyped dictionaries are a superset of JSON. JSON is (more or less) precisely:
Dict[str, JSON] | List[JSON] | str | float | int | bool | None
Also, python's type-hinting supports forward-references which are what you would use for recursive or "self-referencing" types.
Personally, I like the slow pace they're taking with the typing. It's touching the core usage of the language in a fundamental way and I don't think that can be rushed. We're seeing lots of community growth around the type-hinting, even using them at run-time, which is amazing to watch and marvel at.