Python Steering Council unanimously accepts "PEP 810, Explicit lazy imports"
31–40 of 64 posts
Re: Python Steering Council unanimously accepts "PEP 810, Explicit lazy imports"
#32Earlier quoted context omitted.
> I suspect this change in Python will dramatically improve the performance of such large programs as well. Makes packaging super fun too, where you need to hit every possible path so you don't miss anything imported in 1% of the execution paths :)
I can't even express how negatively I feel about build/packaging systems that process dependencies based on code-level imports instead of some explicit build manifest separate to the code.
Re: Python Steering Council unanimously accepts "PEP 810, Explicit lazy imports"
#33Re: Python Steering Council unanimously accepts "PEP 810, Explicit lazy imports"
#34Python is quickly turning into a crowded keyword junkyard
Re: Python Steering Council unanimously accepts "PEP 810, Explicit lazy imports"
#35Python is quickly turning into a crowded keyword junkyard
Further, this lack of first class support for lazy importing has spawned multiple CPython forks that implement their own lazy importing or a modified version of the prior rejected PEP 690. Reducing the real world need for forks seems worth the price of one keyword.
Re: Python Steering Council unanimously accepts "PEP 810, Explicit lazy imports"
#36Next we need lazy import *
Re: Python Steering Council unanimously accepts "PEP 810, Explicit lazy imports"
#37Earlier quoted context omitted.
Can't you do some kind of static analysis instead?
Depends if your code has horrors like this lurking in it: m = importlib.import_module(requests.get("http://localhost:8000/package_name").content.strip().decode("ASCII"))
Re: Python Steering Council unanimously accepts "PEP 810, Explicit lazy imports"
#38Earlier quoted context omitted.
Can't you do some kind of static analysis instead?
Depends if your code has horrors like this lurking in it: m = importlib.import_module(requests.get("http://localhost:8000/package_name").content.strip().decode("ASCII"))
Re: Python Steering Council unanimously accepts "PEP 810, Explicit lazy imports"
#39Python is quickly turning into a crowded keyword junkyard
It is a 'soft keyword' as the PEP explains. I would not think that this has any major impact on anyone who just chooses to ignore this feature. Assuming that you want this behavior, I wonder how this could have been done in a better fashion without now having 'lazy' in the specific context of an import statement.
"A new soft keyword lazy is added. A soft keyword is a context-sensitive keyword that only has special meaning in specific grammatical contexts; elsewhere it can be used as a regular identifier (e.g., as a variable name). The lazy keyword only has special meaning when it appears before import statements..."
Re: Python Steering Council unanimously accepts "PEP 810, Explicit lazy imports"
#40I think HN is translating the link somehow? It should be directing to this post: https://discuss.python.org/t/pep-810-explicit-lazy-imports/1... """ Dear PEP 810 authors. The Steering Council is happy to unanimously [4 votes, as Pablo cannot vote] accept “PEP 810, Explicit lazy imports”. Congratulations! We appreciate the way you were able to build on and improve the previously discussed (and rejected) attempt at laz…
HN is using the canonical URL for the page. See https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes...