Skip to content

Commit 968cf92

Browse files
committed
Merge pull request prakhar1989#11 from Xuefeng-Zhu/patch-4
change hard coded default wright in add_edge
2 parents d186427 + d996988 commit 968cf92

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

graphs/digraph.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ def __init__(self):
1818
def __str__(self):
1919
return "Directed Graph \nNodes: %s \nEdges: %s" % (self.nodes(), self.edges())
2020

21-
def add_edge(self, edge, wt=1, label=""):
21+
def add_edge(self, edge, wt=DEFAULT_WEIGHT, label=""):
2222
"""
2323
Add an edge to the graph connecting two nodes.
2424
An edge, here, is a pair of node like C(m, n) or a tuple

0 commit comments

Comments
 (0)