PEP 690: Lazy Imports

I don’t find this useful. Code already has a way to do this today: import re in the code right next to where it is used instead of as a top level import. Exact same effect.

The startup time benefit of lazy imports only comes from enabling them broadly, not by requiring all code in your application’s entire transitive dependencies to be modified to declare most of their imports as lazy. We do not want people to need to learn yet another import syntax to replace what we already have.

9 Likes