__and__is a binary (bitwise) operator &, not a logical operator and.
Since the operator andis a short circuit operator, it cannot be implemented as a function. That is, if the first argument is false, the second argument is not evaluated at all. If you try to implement this as a function, both arguments must be evaluated before the function is called.
source
share