in geneve/utils/solution_space.py [0:0]
def __iand__(self, other):
if not isinstance(other, Strings):
other = Strings(other)
if other.__set == everything():
return self
if self.__set == everything():
other = other.__copy__()
if self.__exclude:
other -= self.__exclude
self.__set = other.__set
self.__exclude = other.__exclude
return self
new_set = set()
for s in self.__set:
for o in other.__set:
if s == o:
new_set.add(s)
elif o[1] and fnmatchcase(s[0].lower(), o[0].lower()): # o has wildcards
new_set.add(s)
elif s[1] and fnmatchcase(o[0].lower(), s[0].lower()): # s has wildcards
new_set.add(o)
self.__set = new_set
return self