def __instancecheck__(self, obj): if issubclass(obj.__class__, Set): return False return super().__instancecheck__(obj)