logoalt Hacker News

WithinReasonyesterday at 9:20 AM1 replyview on HN

I would have gone for:

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


Replies

ruszkiyesterday at 12:23 PM

That’s also an option. The left to right flow is better for the sake of autocomplete and comprehension: when you start to read your right to left version, you don’t know what is p, then row, then mat. With left to right, this problem doesn’t exist.

One for sure, both are superior to the garbled mess of Python’s.

Of course if the programming language would be in a right to left natural language, then these are reversed.