Earlier quoted context omitted.
Python has about 40 keywords, I say I would regularly use about 30, and irregularly use about another 5. Hardly seems like a "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.
For those curious here are the actual keywords (from https://docs.python.org/3/reference/lexical_analysis.html?ut... ) Hard Keywords: False await else import pass None break except in raise True class finally is return and continue for lambda try as def from nonlocal while assert del global not with async elif if or yield Soft Keywords: match case _ type I think nonlocal/global are the only hard keywords I now barely…
Python Steering Council unanimously accepts "PEP 810, Explicit lazy imports"
51–60 of 64 posts
Re: Python Steering Council unanimously accepts "PEP 810, Explicit lazy imports"
#52Earlier quoted context omitted.
If you want even better nightmares, you can make localhost:8000 forward to a container running claude code with --dangerously-skip-permissions which uses an unkindness of mcp servers to control that endpoint on the fly based (amongst other sources) on 4chan's /b/.
> which uses an unkindness of mcp servers I guess you meant "a feature of MCP servers which is unkind", but I couldn't help but interpret "unkindness" as the collective noun for a group of MCP servers.
Re: Python Steering Council unanimously accepts "PEP 810, Explicit lazy imports"
#53Earlier quoted context omitted.
Python has about 40 keywords, I say I would regularly use about 30, and irregularly use about another 5. Hardly seems like a "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.
For those curious here are the actual keywords (from https://docs.python.org/3/reference/lexical_analysis.html?ut... ) Hard Keywords: False await else import pass None break except in raise True class finally is return and continue for lambda try as def from nonlocal while assert del global not with async elif if or yield Soft Keywords: match case _ type I think nonlocal/global are the only hard keywords I now barely…
Re: Python Steering Council unanimously accepts "PEP 810, Explicit lazy imports"
#54Python is quickly turning into a crowded keyword junkyard
The pep didn’t mention considering reusing `async` instead of `lazy`. That would’ve conveyed the same thing to me without a new keyword, and would haven’t been similar to html’s usage `async`.
Re: Python Steering Council unanimously accepts "PEP 810, Explicit lazy imports"
#551. Standard library imports.
2. Related third party imports.
3. Local application/library specific imports.
https://peps.python.org/pep-0008/#imports
Based on the examples in PEP 810, I suppose each group of regular imports can be followed by a group of lazy imports?
import os
import sys
lazy import json
import fastapi
lazy import numpy
import myapi
import mymodels
lazy import myutils
...Re: Python Steering Council unanimously accepts "PEP 810, Explicit lazy imports"
#56Earlier quoted context omitted.
The pep didn’t mention considering reusing `async` instead of `lazy`. That would’ve conveyed the same thing to me without a new keyword, and would haven’t been similar to html’s usage `async`.
I personally would have preferred "defer import os" instead of "lazy import os". It might be the non-native showing but lazy import feels unserious.
Re: Python Steering Council unanimously accepts "PEP 810, Explicit lazy imports"
#57Python is quickly turning into a crowded keyword junkyard
* Javascript (ECMAScript) has 63 keywords. * Rust has 50 keywords. * Java has 51 keywords + 17 contextually reserved words, for a total of 68. * Python has now 36 keywords + 4 'soft' keywords, for a total of 40. * Go has 25 keywords.
Re: Python Steering Council unanimously accepts "PEP 810, Explicit lazy imports"
#58If Meta also starts firing Python developers, development might return to normal.
Re: Python Steering Council unanimously accepts "PEP 810, Explicit lazy imports"
#59Earlier quoted context omitted.
The pep didn’t mention considering reusing `async` instead of `lazy`. That would’ve conveyed the same thing to me without a new keyword, and would haven’t been similar to html’s usage `async`.
I personally would have preferred "defer import os" instead of "lazy import os". It might be the non-native showing but lazy import feels unserious.
Re: Python Steering Council unanimously accepts "PEP 810, Explicit lazy imports"
#60Earlier quoted context omitted.
You have always been able to do the same thing in Python. This PEP isn't needed for that functionality.
You can declare imports at the beginning of a program that don’t load until they are used?