#mypy

[ follow ]
Python
fromPeterbe
2 weeks ago

In Python, you have to specify the type and not rely on inference - Peterbe.com

TypeScript infers literal argument types causing compile-time errors for mismatched values; Python's mypy requires explicit annotations to report the same mismatches.
Python
fromRealpython
1 month ago

What Does -> Mean in Python Function Definitions? Quiz - Real Python

Python uses -> in function signatures to provide return type hints and enable static checking with tools like mypy; annotate containers for precise types.
[ Load more ]