Menu

1 / 11

Advancing Python typing

Vercel News·Yury Selivanov·5 months ago
#43dLaASD
#vercel#python#type#typescript#runtime
Reading 0:00
15s threshold

We’re excited to share a year-long research effort aimed at making Python’s type system more expressive and composable, something closer in spirit to the programmable types in TypeScript, but carefully crafted for Python’s runtime model. The result is PEP 827: Type Manipulation .

Python’s runtime is incredibly powerful: classes, methods, and even whole APIs can be generated on the fly from a few lines of code. Concepts like metaprogramming can transform class declarations, decorators can give functions and methods additional behaviors, and those are just a few examples.

But Python's static typing often can’t “follow along” without typechecker plugins or boilerplate code.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.