Ian Bicking: the old part of his blog


There is a clear distinction between "tricky" and compact. Compact code can be easier to read/browse because there is less to analyze.

Compare a list comprehension with an equivalent loop. You can do all kinds of strange stuff in a loop, including adding the current item to either end of the loop, break out of the loop (making a shorter resulting list), etc. With a list comprehension, you know what is being done.

I think Python desperately needs a terneray operator like C. Then it will be obvious what the programmer is trying to do and you can mentally "skip over" it unless you are analyzing the details of that line.
Comment on Code Pickiness