Skip to content
Opensource internals
  • Posts

Typing

CPython's types.GenericAlias Implementation in C

Oct 20, 2026 11 min read Jay Hubbert

types.GenericAlias is a five-field C struct wrapping an origin and a tuple of args, with parameters computed lazily and cached under a critical section.

PythonCpythonInternalsGenericaliasTyping

Read more →

CPython's TypeVar, TypeVarTuple, and ParamSpec Implementation in C

Oct 20, 2026 6 min read Jay Hubbert

Python’s type variables – typing.TypeVar, typing.TypeVarTuple, typing.ParamSpec (plus typing.TypeAliasType) – used to live entirely in Lib/typing.py. In CPython 3.15 they are …

PythonCpythonInternalsTypingTypevar

Read more →

© 2026 Jay Hubbert · Built with Hugo 0.168.0

RSS ·