ontology = set()
def add(s):
ontology.add(s)
def show():
for item in ontology:
print(item)
def link(s1, s2):
# Python requires you add hashable objects to sets to determine duplicates; sets aren’t hashable because mutable, apparently
ontology.add(frozenset([s1, s2]))
def delete(s):
ontology.discard(s)
ontology = set()
def add(s):
ontology.add(s)
def show():
for item in ontology:
print(item)
def link(s1, s2):
# Python requires you add hashable objects to sets to determine duplicates; sets aren’t hashable because mutable, apparently
ontology.add(frozenset([s1, s2]))
def delete(s):
ontology.discard(s)