Live data from Hacker News

Python Steering Council unanimously accepts "PEP 810, Explicit lazy imports"

discuss.python.org

61–64 of 64 posts

Re: Python Steering Council unanimously accepts "PEP 810, Explicit lazy imports"

#63
post #27

This is great for building modules. One can now lazy import all interesting names on __init__.py, so that instead of having to remember `from module.some_submodule_that_you_need_to_remember import method` you can just do `from module import name`.

https://peps.python.org/pep-0810/#what-about-star-imports-fr... > What about star imports (`from module import *`)? > Wild card (star) imports cannot be lazy - they remain eager. This is because the set of names being imported cannot be determined without loading the module. Using the lazy keyword with star imports will be a syntax error. If lazy imports are globally enabled, star imports will still be eager. Additio…

? This has nothing to do with star imports

Re: Python Steering Council unanimously accepts "PEP 810, Explicit lazy imports"

#64
post #27

Earlier quoted context omitted.

https://peps.python.org/pep-0810/#what-about-star-imports-fr... > What about star imports (`from module import *`)? > Wild card (star) imports cannot be lazy - they remain eager. This is because the set of names being imported cannot be determined without loading the module. Using the lazy keyword with star imports will be a syntax error. If lazy imports are globally enabled, star imports will still be eager. Additio…

? This has nothing to do with star imports

My bad for misreading you
Post reply on HN