Regarding import times, currently (read, 3.13) typing
has a module-level __getattr__
to generate some aliases on-the-fly.
Wouldn’t moving the special forms implementations to an “internal” module, something like _typing.py
or _typing_internals.py
, and using typing
’s __getattr__
to get them from that module help reduce load times? Or would module resolution merge everything anyway?