PEP 690: Lazy Imports

Wouldn’t it be exciting if it this feature was called "heavily encouraged” instead? some times I’ve thought this could be the default for Python imports. But I think we’re a long way away from it (I wouldn’t mind if it happens at some point, but we’ll see). I get that there are a lot of cases where we expect import to immediately load and execute code, but in essence I think it’s thrilling to think about a way to have things imported lazily (only when it’s actually needed) instead of having to pay for the, some times very expensive, eager costs.

1 Like