> (x + (if is_true(): 1 else: 2)) [is invalid in Python] because the if–else conditional is a statement, and can only be used in certain positions.
Point taken, but troll-mode pedantry: (x + (1 if is_true() else 2)) would be valid :)
...but, in that case, the `X if Y else Z` syntax is considered to be an expression in Python. You can't, for example, omit the `else Z` part. In Haskell -- again, in which everything's an expression -- conditionals are the same, just written in the "normal" order: `if Y then X else Z`.
Point taken, but troll-mode pedantry: (x + (1 if is_true() else 2)) would be valid :)