Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def combine(self, other):
if isinstance(other, ClosureSet):
return other.combine(self)
elif isinstance(other, ClosureT):
if self == other:
return self
else:
return ClosureSet(self, other)
else:
raise IncompatibleTypes(self, other)
def combine(self, other):
if isinstance(other, ClosureSet):
return other.combine(self)
elif isinstance(other, ClosureT):
if self == other:
return self
else:
return ClosureSet(self, other)
else:
raise IncompatibleTypes(self, other)
def combine(self, other):
if isinstance(other, ClosureSet):
combined_closures = self.closures.union(other.closures)
if combined_closures != self.closures:
return ClosureSet(combined_closures)
else:
return self
else:
raise IncompatibleTypes(self, other)