Ah, yeah I see what you mean. If I'm understanding you correctly, the fact that we are calling the Python interpreter internal functions during that calculation makes it branch because it is not pre-calculated?
There's probably something at the instruction level which allows the constant ternary expressions to be non-branching.