News for hackers. Stuff that matters.
Re:Ruby 3.2.0 Is from Another Dimension by michaelteter on Wednesday January 04, 2023 @01:50PM (#34249723)
And yet, in the production Python codebases I've worked with, list comprehensions are rarely seen. Usually it's typical loop iterations. I wonder why that is?...
Re:Ruby 3.2.0 Is from Another Dimension by empthought on Thursday January 05, 2023 @01:12PM (#34263990)
This says much more about you and the developers and codebases you work with than anything to do with Python list comprehensions.

Coming from a point of zero knowledge of the codebase, I picked Flask. I picked the cli.py module in Flask. And what do I find?

https://github.com/pallets/flask/blob/main/src/flask/cli.py#...

https://github.com/pallets/flask/blob/main/src/flask/cli.py#...

https://github.com/pallets/flask/blob/main/src/flask/cli.py#...

https://github.com/pallets/flask/blob/main/src/flask/cli.py#...

https://github.com/pallets/flask/blob/main/src/flask/cli.py#...

https://github.com/pallets/flask/blob/main/src/flask/cli.py#...

https://github.com/pallets/flask/blob/main/src/flask/cli.py#...

https://github.com/pallets/flask/blob/main/src/flask/cli.py#...

The keyword "for" occurs twice as often in comprehensions and generator expressions as it does in "typical loop iterations!"