utils.py
branchstable
changeset 4317 b2093f8f0493
parent 4212 ab6573088b4a
child 4335 1314772c1183
child 4501 71ba2d0f34f2
--- a/utils.py	Thu Jan 21 14:10:23 2010 +0100
+++ b/utils.py	Thu Jan 21 16:52:35 2010 +0100
@@ -151,6 +151,9 @@
 # use networkX instead ?
 # http://networkx.lanl.gov/reference/algorithms.traversal.html#module-networkx.algorithms.traversal.astar
 def transitive_closure_of(entity, relname, _seen=None):
+    """return transitive closure *for the subgraph starting from the given
+    entity* (eg 'parent' entities are not included in the results)
+    """
     if _seen is None:
         _seen = set()
     _seen.add(entity.eid)