Fork me on GitHub"

# skbio.tree.TreeNode.find_all

`TreeNode.``find_all`(name)

  Find all nodes that match name

  State: Experimental as of 0.4.0.

  The first call to find_all will cache all nodes in the tree on the assumption that additional calls to find_all will be made.

  Parameters:

  name : TreeNode or str

  > The name or node to find. If name is TreeNode then all other nodes with the same name will be returned.

  Returns:

  list of TreeNode

  > The nodes found

  Raises:

  MissingNodeError

  > Raises if the node to be searched for is not found

  See also

  `find`, `find_by_id`, `find_by_func`

  Examples

      >>> from skbio.tree import TreeNode
      >>> tree = TreeNode.read(["((a,b)c,(d,e)d,(f,g)c);"])
      >>> for node in tree.find_all('c'):
      ...     print(node.name, node.children[0].name, node.children[1].name)
      c a b
      c f g
      >>> for node in tree.find_all('d'):
      ...     print(node.name, str(node))
      d (d,e)d;

      d d;