TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Mypy Exercises

4 pointsby l0b0almost 4 years ago

1 comment

l0b0almost 4 years ago
Python type annotations have a fairly steep learning curve. First it&#x27;s all `name: str` and suddenly it&#x27;s all Unions and Optionals and TypedDicts. These are some exercises to get from the basics to the advanced stuff, with some background on why you&#x27;d want to do it in the first place. It&#x27;s meant to be used either for self-study or in a highly interactive group. I&#x27;ve tried to use realistic examples of code you might actually want to write.<p>Thanks to my employer, Toitū Te Whenua LINZ, for giving me the time to build this!