3 ms·
> boolean dunder methods: __and__, __or__ Those are the bitwise operators (a & b, a | b). You can’t override the behavior of the boolean operators (a and b, a
by Kwpolska 4y ago
> boolean dunder methods: __and__, __or__
Those are the bitwise operators (a & b, a | b). You can’t override the behavior of the boolean operators (a and b, a or b), you can only define the truthiness of your object with __bool__.