Hacker News new | ask | show | jobs
by dragonwriter 1269 days ago
> You do have to embrace types though; if you have a dictly typed program where everything is a Dict[str, Any], then putting that in annotations isn’t going to be very helpful; converting the dicts to named tuples or dataclasses is.

Or even just TypedDict, which often works without any changes besides annotations.