BlogsVercelPython Type Manipulation

Python Type Manipulation

Python Type Manipulation

1
posts
2026

Vercel is researching and contributing to advancements in Python's type system, aiming to make it more expressive and composable, similar to TypeScript's programmable types. This effort has resulted in PEP 827, which proposes standard type-level building blocks for introspecting and constructing types, benefiting both type checkers and runtime tooling. The goal is to align Python's static typing with its dynamic runtime capabilities, enabling frameworks like Pydantic to leverage these improvements.

2026

Advancing Python typing

3/2/2026

This post introduces PEP 827: Type Manipulation, a research effort to enhance Python's type system. It details how this proposal aims to make Python types more expressive and composable, akin to TypeScript's programmable types, by providing standard type-level building blocks for introspection and construction. Concrete examples of implementing `Pick` and `Omit` in Python, contrasting them with TypeScript, are provided to illustrate the approach. The post emphasizes aligning Python typing with its runtime semantics for improved tooling and framework capabilities.