##// END OF EJS Templates
ancestor: improve docstring...
Sune Foldager -
r9915:806e6b6c default
parent child Browse files
Show More
@@ -9,10 +9,11 b' import heapq'
9
9
10 def ancestor(a, b, pfunc):
10 def ancestor(a, b, pfunc):
11 """
11 """
12 return the least common ancestor of nodes a and b or None if there
12 return a minimal-distance ancestor of nodes a and b, or None if there is no
13 is no such ancestor.
13 such ancestor. Note that there can be several ancestors with the same
14 (minimal) distance, and the one returned is arbitrary.
14
15
15 pfunc must return a list of parent vertices
16 pfunc must return a list of parent vertices for a given vertex
16 """
17 """
17
18
18 if a == b:
19 if a == b:
General Comments 0
You need to be logged in to leave comments. Login now