> Python programmers in general have an irrational aversion to if-expressions, a.k.a. the “ternary” operator. Because the Python ternary operator is fucking backwards! Why on earth would you put the condition in the middle !? x = 4 if condition() else 5 vs.: condition() ? 4 : 5 vs. the author's own lisp example: (setq x (if (condition) 4 5)) I love ternary operators, and Lisp/ML-style if else blocks that return thing…
Because that's what Guido liked, that's the answer. I don't like it much, but it's neat that the "happy" path value is a prefix of the assignment statement, i.e. in x = 4 if thing() else -1 there is a prefix x = 4 which, if the predicate is "expected," is like saying x = value (... unless blah blah) which, I could see some people liking (maybe Dutch people). Let's just write everything in Scheme for God's sake JOIN U…
> x = value (... unless blah blah)
Except it's the opposite of that, because "if" is the opposite of "unless". It's more like saying
x = value (... if blah blah)