I came up with an idea for a new Python keyword called “only”.
The idea is to check all available values and find the ones that satisfy a condition without having to manually write multiple loops or “if/else” statements.
I know this can already be done in Python, but I thought it would be interesting to explore whether “only” could make this process simpler.
What do you guys think? Is something like this already possible?
Could you give a specific example of some code that works, and the code that you would like to replace it with?
The odds of this being worth a new keyword are extraordinarily low (because the bar is very high), but I’m curious what your proposal specifically is.
Moving to the Help category. You’ll want a good understanding of Python, and figure out exactly what you want out of a new feature that’s not already available before proposing an Idea.