Python programs are set to get faster startup times with PEP 810 "Explicit lazy imports," which allows scripts to defer loading imported libraries until they're actually needed rather than at startup.

The Python Enhancement Proposal (PEP) was put forward by Pablo Salgadoon, Steering Council Member, on October 3 and approved November 3 . The enhancement will bring lazy imports into the Python language itself, as an opt-in feature.

Importing modules in Python is both a boon and a pain. A boon, because a few import statements can hugely extend the functionality of a program, but a pain because the symbols imported might never get used, potentially increasing the start-up time. A good example of this would be invoking a program from the command line with something like --help and having to w

See Full Page