in this case plain old C syntax is much more readable:
x = (a==42) ? f() : g();
x = (a==42) ? f() : g();
Which is more readable:
> condition ? value1 : value2
or > value1 if condition else value2
Maybe the latter is just more readable to me because I'm used to reading Perl all day long that looks like: > die unless condition;
> return true if condition;
> return false
> if condition1 && condition2 && condition3;
That said, I'm also used to reading: > return condition1 ? value1
> : condition2 ? value2
> : condition3 ? value3
> : value4;
and I still find the Python ternary operator more readable: > return value1 if condition1 else
> value2 if condition2 else
> value3 if condition3 else
> value4 f() if a==42 else g()
looks much more readable to me than f() if a == 42 else g() x = (a==42) and f() or g()