3 ms·
I don’t think this criticism is valid for Python specifically where the most Pythonic expressions, generators of all forms, are read front to back like this.
by Spivak 5y ago
I don’t think this criticism is valid for Python specifically where the most Pythonic expressions, generators of all forms, are read front to back like this.
[ x.attr for x in list if x in someset]
There are languages where this kind of thing would be considered ugly and you’re supposed to use map/filter but in Python they’re the best practice. Every Python programmer is already trained to read expressions like this.