@stloyd the change ``or`` to ``||`` would be wrong. This code here is using the control flow operator, not the boolean operator. Doing the change will even break the logic because of the different precedence of ``or`` and ``||``.
However, I agree that using a ``if`` would be more readable than using the control flow operator here.