2 ms·
That's the wrong part of the doc. You refer to the binary operators || and &&, etc. This is the correct part: https://docs.python.org/3/reference/expressions.h
by maweki 5y ago
That's the wrong part of the doc. You refer to the binary operators || and &&, etc.
This is the correct part: https://docs.python.org/3/reference/expressions.html?highlight=operators#boolean-operations https://docs.python.org/3/reference/expressions.html?highlig...
Edit: you can't override "and" and "or" with dunder methods.
- OJFord 5y agoAhh of course, thanks!