Python 3.15 Preview: Lazy Imports Quiz
Interactive Quiz ⋅ 12 Questions
By Joseph Peart
In this quiz, you’ll test your understanding of Python 3.15 Preview: Lazy Imports.
Python 3.15 adds a lazy keyword that puts off loading a module until the first time you use it. The import statement stays where it belongs, at the top of your file, but the work of running it moves to the moment something touches the module’s name.
By working through this quiz, you’ll revisit how the lazy keyword defers a module until something reads its name, how much startup time deferring the right imports can save, where Python refuses to accept the keyword, how __lazy_modules__ gets you the same deferral on older Pythons, and which imports have to stay eager.
The quiz contains 12 questions and there is no time limit. You’ll get 1 point for each correct answer. At the end of the quiz, you’ll receive a total score. The maximum score is 100%. Good luck!