Hacker News new | past | comments | ask | show | jobs | submit
> [p for mat in state_dict.values() for row in mat for p in row]

I'm so happy without seeing Python list comprehensions nowadays.

I don't know why they couldn't go with something like this:

[state_dict.values() for mat for row for p]

or in more difficult cases

[state_dict.values() for mat to mat*2 for row for p to p/2]

I know, I know, different times, but still.

{"deleted":true,"id":47204880,"parent":47204738,"time":1772354385,"type":"comment"}
I would have gone for:

[for p in row in mat in state_dict.values()]

loading story #47206077