Back to browse
PEP 827 – TS-like type manipulation in Python

PEP 827 – TS-like type manipulation in Python

by 1st1·Mar 2, 2026·7 points·0 comments

AI Analysis

●●SolidBig BrainBold Bet

TypeScript conditionals and mapped types for Python typing—closes the metaprogramming gap, but adoption needs ecosystem buy-in.

Strengths
  • Directly addresses Meta's 2025 survey: #1 most-requested feature from TypeScript users, empirically justified.
  • Bridges Python's dynamic metaprogramming with static typing without requiring mypy plugin fragmentation.
  • Concrete use case (Prisma-style ORM type inference) shows real library pain, not theoretical abstraction.
Weaknesses
  • Still in Draft status; success depends on mypy, Pyright, and IDE implementers adopting the spec.
  • No reference implementation shown; unclear how this handles Python's runtime type system without breaking existing code.
Target Audience

Python core developers, type checker maintainers (mypy, Pyright), library authors using metaprogramming

Similar To

TypeScript conditional types · PEP 681 (@dataclass_transform) · Pydantic's type inference

Similar Projects

AI/ML●●Solid

Lore – Cross-Agent Memory SDK (Python and TypeScript)

Local-first design — SQLite plus on-device ONNX embeddings — provides a small-footprint way to share operational lessons between agents, and automatic PII redaction is a thoughtful, tangible safeguard. The one-line publish/query API, cross-language SDKs (Python + TypeScript), and a planned FastAPI/Postgres+pgvector server show practical engineering trade-offs rather than vaporware.

Niche GemSolve My Problem
amit_paz
104mo ago