Python steering council accepts lazy imports
Barry Warsaw, writing for the Python steering council, has announcedthat PEP810 ("Explicit lazyimports") has been approved, unanimously, by the four who could vote. SincePablo Galindo Salgado was one of the PEP authors, he did not vote. The PEP provides a way to defer importing modules until the namesdefined in a module areneeded by other parts of the program. We covered the PEP and the discussion around ita few weeks back. The council also had "
recommendations about some ofthe PEP's details, a few suggestions for filling a couple of smallgaps", 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'schoice of the lazy keyword. The closest challenger wasdefer, but once we tried to use that in all the places where theterm is visible, we ultimately didn't think it was as good an overallfit. The same was true with all the other alternative keywords we couldcome 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.