godot/base_graph.py
def delete_edge(self, tail_node_or_ID, head_node_or_ID):
        """ Removes an edge from the graph. Returns the deleted edge or None.
        """
        if isinstance(tail_node_or_ID, Node):
            tail_node = tail_node_or_ID
        else:
            tail_node = self.get_node(tail_node_or_ID)

        if isinstance(head_node_or_ID, Node):
            head_node = head_node_or_ID
        else:
            head_node = self.get_node(head_node_or_ID)

        if (tail_node is None) or (head_node is None):
            return None

        for i, edge in enumerate(self.edges):
            if (edge.tail_node == tail_node) and (edge.head_node == head_node):
                edge = self.edges.pop(i)
                return edge

        return None
def delete_edge(self, tail_node_or_ID, head_node_or_ID):
        if isinstance(tail_node_or_ID, Node):
            tail_node = tail_node_or_ID
        else:
            tail_node = self.get_node(tail_node_or_ID)

        if isinstance(head_node_or_ID, Node):
            head_node = head_node_or_ID
        else:
            head_node = self.get_node(head_node_or_ID)

        if (tail_node is None) or (head_node is None):
            return None

        for i, edge in enumerate(self.edges):
            if (edge.tail_node == tail_node) and (edge.head_node == head_node):
                edge = self.edges.pop(i)
                return edge

        return None
def delete_edge ( self , tail_node_or_ID , head_node_or_ID ) : if isinstance ( tail_node_or_ID , Node ) : tail_node = tail_node_or_ID else : tail_node = self . get_node ( tail_node_or_ID ) if isinstance ( head_node_or_ID , Node ) : head_node = head_node_or_ID else : head_node = self . get_node ( head_node_or_ID ) if ( tail_node is None ) or ( head_node is None ) : return None for i , edge in enumerate ( self . edges ) : if ( edge . tail_node == tail_node ) and ( edge . head_node == head_node ) : edge = self . edges . pop ( i ) return edge return None
Removes an edge from the graph. Returns the deleted edge or None.
Removes an edge from the graph . Returns the deleted edge or None .