Hacker News new | past | comments | ask | show | jobs | submit login

> for more complex data structures (think a json response from an api), dict (or typing.Dict) work fine

One of the reason I use typing is IDE completion and error highlighting. For that purpose - I make sure to annotate even the obvious primitive types and for API responses, I find that defining a Pydantic model works very well.




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: