Python Cheatsheet 02 — Type Hints (Modern)

Cheatsheet: X | None syntax, generics, Protocol, TypedDict, ParamSpec, type guards.

May 17, 2026 · 3 min · 606 words · Manvendra Rajpoot

Modern Python Type Hints in 2026 — PEP 695, PEP 705, and the Patterns to Use

What changed in Python’s type system through 2024–2026 — PEP 695 type-parameter syntax, PEP 705 ReadOnly, TypedDict, Protocols, NewType, Self, and the patterns I keep reaching for in production.

April 30, 2026 · 7 min · 1302 words · Manvendra Rajpoot