On 29/03/2026 15.49, Gilmeh Serda wrote:
On Thu, 26 Mar 2026 01:40:15 -0000 (UTC), Lawrence D’Oliveiro wrote:

“Lazy”

[PEP] TL;DR

 From the initial idea I got that now we have to have the word lazy
scattered all over the place for every module that needs to be loaded in
such a manner:

lazy import blah
lazy import whatever
lazy from thisorthat import meh


Wouldn't it have been better if they used, e.g. "with" as a starter? Like
so:

with lazy:
     import blah
     import whatever
     from thisorthat import meh

Then it would have been much smoother to handle.

Why?

It's one line more and large overhead for few imports.
And the IDE can expand automatically the "lazy" part.

Furthermore, it can always be added later, as alternative
to explicit "lazy" in front of the import.

So, I personally do not see this as needed feature now.

My 2¢ worth...

Same...

bye,

--

piergiorgio
--
https://mail.python.org/mailman3//lists/python-list.python.org

Reply via email to