From: W. Trevor King Date: Tue, 25 Nov 2008 12:12:52 +0000 (-0500) Subject: Oops, should be passing libbe.tree.Tree.sort() args to children. Fixed. X-Git-Tag: 1.0.0~108 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=ed4d971d1375a692fbd3a394237f56e851bb5d0e;p=be.git Oops, should be passing libbe.tree.Tree.sort() args to children. Fixed. --- 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): """