stundenplan/src/pygraph/graphdemo.py
@@ -8,6 +8,7 @@ if not isinstance(vertex, int): raise TypeError(f"Argument {vertex} is not a valid vertex") self._adjacent[vertex] = set() self._vertex_attribute[vertex] = {} pass def add_edge(self, u, v): @@ -35,7 +36,7 @@ """ if vertex not in self._adjacent: raise ValueError(f"Graph does not include vertex {vertex}") old_attributes = self._vertex_attribute[vertex] old_attributes = self._vertex_attribute.get[vertex] self._vertex_attribute[vertex] = old_attributes | properties return self pass