Reputation: 77
In Python, is there a set that effectively functions as a set that contains all possible sets?
Upvotes: 3
Views: 484
Reputation: 5948
You could subclass set
:
class FullSet(set):
def __contains__(self, item):
return True
fullset = FullSet()
print({1, 2, 3} in fullset)
output:
True
Upvotes: 6