From ed4d971d1375a692fbd3a394237f56e851bb5d0e Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Tue, 25 Nov 2008 07:12:52 -0500 Subject: [PATCH] Oops, should be passing libbe.tree.Tree.sort() args to children. Fixed. --- libbe/tree.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libbe/tree.py b/libbe/tree.py index e6f144e..9e07ee3 100644 --- a/libbe/tree.py +++ b/libbe/tree.py @@ -39,6 +39,9 @@ class Tree(list): >>> a.branch_len() 5 + >>> a.sort(key=lambda node : -node.branch_len()) + >>> "".join([node.n for node in a.traverse()]) + 'acfhiebdg' >>> a.sort(key=lambda node : node.branch_len()) >>> "".join([node.n for node in a.traverse()]) 'abdgcefhi' @@ -93,7 +96,7 @@ class Tree(list): """ list.sort(self, *args, **kwargs) for child in self: - child.sort() + child.sort(*args, **kwargs) def traverse(self, depthFirst=True): """ -- 2.26.2