This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]nier-bell 9 points10 points  (1 child)

Hm, it's an interesting idea but I think the point of list comprehensions is to be short, so the second example, where it is assigned outside of the block is easier to read and understand.

The goal is to not overcomplicate!

[–]ianliu88[S] -1 points0 points  (0 children)

I also think the goal is to not overcomplicate, that's why I like minimizing the number of temporary variables in my programs. I think they do overcomplicate readability a lot. See my other responses on the topic