Journey to JSR223 Python 2 of 9

Michael got it. The two expressions are equivalent. Those who have seen my Rules DSL Rules know I like the ternary operator to initialize a variable that should have only one of two values.

Thanks Michael and Rich,
I was aware of the ternary operators and do like it too.

… but simply not came across (since now) the “Shorthand ternary”:

http://book.pythontips.com/en/latest/ternary_operators.html

So - learned something today - Thanks guys :wink:

1 Like