|
> One person can effectively stall all progress out of spite. I'm not sure about this one, I can understand why someone might agree with some of the arguments about list comprehension making readability worse, like stated in this comment: https://github.com/godotengine/godot-proposals/issues/2972#i... I have to agree with @pycbouh. While a lot of things python does is good, I really don't like list comprehension, especially when it becomes nested.
numbers = [[1, 2, 3], [4, 5, 6], [7, 8, 9]]
print([n for sublist in numbers for n in sublist if n % 2 == 0])
# > [2, 4, 6, 8]
Not very readable, and you save what, 3 lines? Not worth.
Some might enjoy writing code like that, others might dislike it. The current lack of such functionality doesn't hold anyone back that much and therefore doesn't get prioritized. It might get introduced in the future, but when there is still lots of discussion for and against adding it instead of how best to actually implement it, you know that the time has not yet come.Personally, I enjoy both LINQ in C# and Streams in Java, perhaps more than a one liner. But again, that's a personal preference and the opinions are often split about syntax related questions. |