TLDR Dev · ARTICLES & TUTORIALS

THE STORY OF PYTHON'S LAZY IMPORTS: WHY IT TOOK THREE YEARS AND TWO ATTEMPTS

techlife.blog14 min read

Summary from the TLDR Dev newsletter

Python suffered from slow startup times for a long time due to eager imports of heavy libraries. An initial proposal, PEP 690, aiming for global lazy imports, was rejected by the Python Steering Council over fears of splitting the ecosystem and deep interpreter modifications. Three years later, a re-envisioned proposal, PEP 810, gained unanimous acceptance by introducing an explicit `lazy` keyword for individual imports.