Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

3
  • I'm curious: what would you like to make an overloaded and do? Or are you just asking for purely theoretical reasons? Commented Aug 31, 2015 at 12:53
  • Purely theoretical. I'm writing something that needs to work with Python AST. For most things like Add, I replace it with a call to __add__, but I was surprised that I couldn't find a function to replace an And node in AST with. Commented Aug 31, 2015 at 12:59
  • I don’t see a good reason why you would want to introduce custom behavior for logical operators that does not match the behavior from evaluating __bool__. Commented Aug 31, 2015 at 13:03