Using logical operators, each side of the expression is logical, which can be separately evaluated. Even if a particular language does not support short circuiting, such an expression can be rewritten without an operator to achieve the same branching behavior. For instance:
if 1 or func(): print 'finished'
can be rewritten:
if 1: pass elif func(): print 'finished'
In contrast, each side of the bitwise operator is an int, as is the result, which is then implicitly passed to boolean before being evaluated conditionally. There is only one logical expression and, therefore, nothing closes.
source share