#type-checking

[ follow ]
Python
fromTall, Snarky Canadian
1 week ago

The varying strictness of TypedDict

TypedDict now controls both key requiredness and whether extra keys are allowed, with Python 3.15 adding closed TypedDict behavior to restrict unknown keys.
Python
fromPeterbe
1 month 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
3 months ago

Python Annotations Quiz - Real Python

Lazy annotations in Python 3.14 defer evaluation of annotations to improve performance, fix forward reference issues, and support static type checking and runtime processing.
#python
fromQuansight
4 months ago
Python

Escaping Contravariance Hell

Contravariance is a key concept in type checking that can cause confusion when using Python typecheckers.
fromInfoWorld
5 months ago
Python

Pyrefly and Ty: Two new Rust-powered Python type-checking tools compared

Python's third-party tools increasingly use Rust for performance and speed improvements.
[ Load more ]