What you seem to want is somewhat close to the way sets work, with the operator | replacing or (which cannot be overridden):
a = {0}
b = {1}
c = a | b # or a.union(b)
a.issubset(c) # True
b.issubset(c) # True
{3}.issubset(c) # False
You could in principle make your own class that extends set:
class Singleton(set):
def __init__(self, n):
super().__init__([n])
def __eq__(self, other):
return self.issubset(other) or other.issubset(self)
a = Singleton(1)
b = Singleton(0)
c = a | b
print(a == c) # True
print(b == c) # True
But it is doubtful whether the confusing code this generates would ever be worth it.