Explicit lazy imports 0 ▲ mathspp.com feed 5 hours ago · Tech · hide · 0 comments Learn how to use lazy imports to speed up the startup time of your Python applications. Python 3.15 introduced explicit lazy imports. An explicit lazy import is an import statement that starts with the keyword lazy: import json lazy import math lazy from pathlib import Path The module json is imported normally, but math and Path are imported lazily. If an import is lazy, the module will only be loaded when it is needed instead of being loaded immediately when Python encounters the import statement. This article explains how to use lazy imports and how to write backwards-compatible code with these features. 15 days of Python 3.15 To celebrate the release of Python 3.15, over the next 15 business days I'll be writing about a new 3.15 feature every day. Explained clearly and with examples so you don't have to sift through the changelog. Subscribe to receive this free email series: Enroll for free 🐍🚀 If you want, you can also check the schedule of the upcoming emails. Why does Python need… No comments yet. Log in to reply on the Fediverse. Comments will appear here.