Back to Python news

Graham Dumpleton: Muru: when lazy imports help

Lazy imports are having a moment. Python 3.15 adds a lazy import statement, from PEP 810, and a module can name imports it wants deferred in a lazymodules list. A deferred import binds its name straight away, but the module isn't loaded until the code first uses it. Most of the excitement is about…

Read it on grahamdumpleton.me

A summary from a public feed. The full text is on the site that published it.