--- matching.py~ 2010-03-30 11:10:18.000000000 -0400 +++ matching.py 2010-04-19 10:31:51.000000000 -0400 @@ -63,14 +63,15 @@ def best(self): if len(self.children): return self.children[0] - else: - return None + if len(self.bastards): + return self.bastards[0] + return None def __len__(self): # Only return the length of the matches so # that this can be used to test if there is # a match. - return len(self.children) + return len(self.children) + len(self.bastards) def __iter__(self): return iter(self.children)