Hacker News new | past | comments | ask | show | jobs | submit login

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.




Ahh of course, thanks!




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: