

def add_weighted_edges_from(self, ebunch, weight='weight', **attr):
    "Add all the edges in ebunch as weighted edges with specified\n        weights.\n\n        Parameters\n        ----------\n        ebunch : container of edges\n            Each edge given in the list or container will be added\n            to the graph. The edges must be given as 3-tuples (u,v,w)\n            where w is a number.\n        weight : string, optional (default= 'weight')\n            The attribute name for the edge weights to be added.\n        attr : keyword arguments, optional (default= no attributes)\n            Edge attributes to add/update for all edges.\n\n        See Also\n        --------\n        add_edge : add a single edge\n        add_edges_from : add multiple edges\n\n        Notes\n        -----\n        Adding the same edge twice for Graph/DiGraph simply updates\n        the edge data.  For MultiGraph/MultiDiGraph, duplicate edges\n        are stored.\n\n        Examples\n        --------\n        >>> G = nx.Graph()   # or DiGraph, MultiGraph, MultiDiGraph, etc\n        >>> G.add_weighted_edges_from([(0,1,3.0),(1,2,7.5)])\n        "
    self.add_edges_from(((u, self, {
        weight: d,
    }) for (u, v, d) in ebunch), **attr)

dataset/ETHPy150Open networkx/networkx/networkx/classes/tests/timingclasses.py TimingGraph.add_weighted_edges_from/VarMisuse@29/420 `v`->`self`