summaryrefslogtreecommitdiff
path: root/tree.py
diff options
context:
space:
mode:
Diffstat (limited to 'tree.py')
-rw-r--r--tree.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/tree.py b/tree.py
index 435b3f0..80f56fc 100644
--- a/tree.py
+++ b/tree.py
@@ -190,7 +190,14 @@ class Node :
"""
return a list with all the nodes descendant from this node
"""
- return flatten(self)
+ if _list is None:
+ _list = []
+ _list.append(self)
+ for c in self.children:
+ c.flatten(_list)
+ return _list
+
+## return flatten(self)
def lineage(self):
"""