No, but...
You cannot override the is, and, or or operators.
Defining __bool__ allows you to write statements like
class Node:
def __init__(self, val):
self.val = val
def __bool__(self):
return self.val is not None # <--- added "return"
for val in (0, 1, True, None):
n = Node(val)
# These three are equivalent
if n:
assert xn.__bool__()
assert n.val is not None
# These three are equivalent
else:
assert not xn.__bool__()
assert n.val is None
https://docs.python.org/3/reference/datamodel.html#object.__bool__