(self, one_node_for_adding, node_attr: dict = {})
| 636 | self._node[n].update(newdict) |
| 637 | |
| 638 | def _add_one_node(self, one_node_for_adding, node_attr: dict = {}): |
| 639 | node = one_node_for_adding |
| 640 | if node not in self._node: |
| 641 | self._adj[node] = self.adjlist_inner_dict_factory() |
| 642 | self._pred[node] = self.adjlist_inner_dict_factory() |
| 643 | |
| 644 | attr_dict = self._node[node] = self.node_attr_dict_factory() |
| 645 | attr_dict.update(node_attr) |
| 646 | else: # If already exists, there is no complain and still updating the node attribute |
| 647 | self._node[node].update(node_attr) |
| 648 | |
| 649 | def add_edge(self, u_of_edge, v_of_edge, **edge_attr): |
| 650 | """Add a directed edge. |
no test coverage detected