godot/base_graph.py
def delete_node(self, node_or_ID):
        """ Removes a node from the graph.
        """
        if isinstance(node_or_ID, Node):
#            name = node_or_ID.ID
            node = node_or_ID
        else:
#            name = node_or_ID
            node = self.get_node(node_or_ID)
            if node is None:
                raise ValueError("Node %s does not exists" % node_or_ID)

#        try:
#            del self.nodes[name]
#        except:
#            raise ValueError("Node %s does not exists" % name)

#        self.nodes = [n for n in self.nodes if n.ID != name]
#        idx = self.nodes.index(name)
#        return self.nodes.pop(idx)

        self.nodes.remove(node)
def delete_node(self, node_or_ID):
        if isinstance(node_or_ID, Node):
#            name = node_or_ID.ID
            node = node_or_ID
        else:
#            name = node_or_ID
            node = self.get_node(node_or_ID)
            if node is None:
                raise ValueError("Node %s does not exists" % node_or_ID)

#        try:
#            del self.nodes[name]
#        except:
#            raise ValueError("Node %s does not exists" % name)

#        self.nodes = [n for n in self.nodes if n.ID != name]
#        idx = self.nodes.index(name)
#        return self.nodes.pop(idx)

        self.nodes.remove(node)
def delete_node ( self , node_or_ID ) : if isinstance ( node_or_ID , Node ) : #            name = node_or_ID.ID node = node_or_ID else : #            name = node_or_ID node = self . get_node ( node_or_ID ) if node is None : raise ValueError ( "Node %s does not exists" % node_or_ID ) #        try: #            del self.nodes[name] #        except: #            raise ValueError("Node %s does not exists" % name) #        self.nodes = [n for n in self.nodes if n.ID != name] #        idx = self.nodes.index(name) #        return self.nodes.pop(idx) self . nodes . remove ( node )
Removes a node from the graph.
Removes a node from the graph .