Skip to content

Commit

Permalink
tree.pyx: Fix and cleanup robinson_foulds() and related functions.
Browse files Browse the repository at this point in the history
The main problem was that the properties used to compare were taken with
  getattr(node, attr)
but now they are normally accessed like
  node.props[prop]

And since you may need both (for example, in a PhyloTree, accessing
t.species can trigger a getter function, so it is not necessarily
the same as t.props["species"]. And thus all the fuzz with has_prop()
and get_prop().

Also, there is some cleanup and small simplifications, and a naming for
variables that better reflect what they mean (hopefully). Including
more changes attr -> prop ("attributes" being the old name, and
"properties" the new one).
  • Loading branch information
jordibc committed Sep 26, 2023
1 parent f360f1a commit 5a6ae1b
Showing 1 changed file with 122 additions and 121 deletions.

0 comments on commit 5a6ae1b

Please sign in to comment.