niemasd / TreeSwift

TreeSwift: Fast tree module for Python 3
https://niema.net/TreeSwift
GNU General Public License v3.0
75 stars 14 forks source link

Create Tree.get_node() function #33

Closed niemasd closed 6 months ago

niemasd commented 6 months ago

Right now, there's no way to get the Node object labeled by a given string. I should add a get_node() function to the Tree class that returns the Node object(s) labeled by the given string

niemasd commented 6 months ago

I should probably also move the num_nodes() function to Node and just have Tree call it on self.root

niemasd commented 6 months ago

Added Tree.find_node() and Node.num_nodes() in https://github.com/niemasd/TreeSwift/commit/e033e043c27055017853ec8b21eafbb5c63421e2