class RusselSet(set): def __contains__(self, other): return other not in other paradox = RusselSet() paradox in paradox # ?