• Python steering council accepts lazy imports

    From LWN.net@1337:1/100 to All on Mon Nov 3 18:30:08 2025
    Python steering council accepts lazy imports

    Date:
    Mon, 03 Nov 2025 18:16:08 +0000

    Description:
    Barry Warsaw, writing for the Python steering council, has announced that PEP810 ("Explicit lazy
    imports") has been approved, unanimously, by the four who could vote. Since Pablo Galindo Salgado was one of the PEP authors, he did not vote. The PEP provides a way to defer importing modules until the names
    defined in a module are
    needed by other parts of the program. We covered the PEP and the discussion around it
    a few weeks back. The council also had " recommendations about some of
    the PEP's details, a few suggestions for filling a couple of small
    gaps ", including: Use lazy as the keyword. We debated many of the given alternatives
    (and some we came up with ourselves), and ultimately agreed with the PEP's choice of the lazy keyword. The closest challenger was defer , but once we tried to use that in all the places where the
    term is visible, we ultimately didn't think it was as good an overall
    fit. The same was true with all the other alternative keywords we could
    come up with, so... lazy it is! What about from foo lazy import bar ? Nope!
    We like that in both module imports and from -imports that the lazy keyword
    is the first thing on the line. It helps to visually recognize lazy imports
    of both varieties.

    ======================================================================
    Link to news story:
    https://lwn.net/Articles/1044844/


    --- Mystic BBS v1.12 A49 (Linux/64)
    * Origin: tqwNet UK HUB @ hub.uk.erb.pw (1337:1/100)