foo = x if y else z
Many languages support the ternary operator, where it would be:
foo = y ? x : z
Some languages like Rust and Kotlin do support assignment of an if statement like
foo = if (y) { x } else { z }
In the beginning of doing Rust I was missing the ternary operator, but now I couldn't care less.
foo = if y { x } else { y }