Hacker News new | ask | show | jobs
by maweki 1797 days 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?highlig...

Edit: you can't override "and" and "or" with dunder methods.

1 comments

Ahh of course, thanks!