Skip to content
Opensource internals
  • Posts

Lazy import

CPython's LazyImport Implementation in C

Oct 20, 2026 10 min read Jay Hubbert

Lazy imports work by parking a proxy object in the namespace and atomically replacing it with the real module the first time the name is touched.

PythonCpythonInternalsLazy importImport

Read more →

© 2026 Jay Hubbert · Built with Hugo 0.168.0

RSS ·