Hacker News new | ask | show | jobs
by aodin 1964 days ago
For the actual type annotations themselves, the official docs are great: https://docs.python.org/3/library/typing.html

Know that the signatures vary with version, so select the correct one.

To check these annotations, you'll need a third-party type checker somewhere in your build process. I use pylance with VS Code, as it can detect errors as I type: https://marketplace.visualstudio.com/items?itemName=ms-pytho...

1 comments

This doesn't seem like an ideal introduction. I don't think it actually covers type checking at all (besides the note at the top) since that's relegated to third parties.