I wasn\'t aware of this, but apparently the and
and or
keywords aren\'t operators. They don\'t appear in the list of python operators. Just out of sh
Python does not currently provide any 'xxx' special methods corresponding to the 'and', 'or' and 'not' boolean operators. In the case of 'and' and 'or', the most likely reason is that these operators have short-circuiting semantics, i.e. the second operand is not evaluated if the result can be determined from the first operand. The usual technique of providing special methods for these operators therefore would not work.
Source: PEP 335
PEP 335 talks about adding the ability to have overloadable operators, and discusses this issue a bit.