caesar0301 / treelib

An efficient implementation of tree data structure in python 2/3.
http://treelib.readthedocs.io/en/latest/
Other
812 stars 186 forks source link

Fix #32: subtree() cannot cooperate with rsearch() #33

Closed mondwan closed 10 years ago

mondwan commented 10 years ago
  1. subtree() hasn't taken care the original bpointer of it's root node which broke rsearch().
  2. Add a if-condition on rsearch() to make sure it will break if tree.root (string) equals current (string)

Note: There are 2 solutions I can come up with which are modifying codes in subtree() or rsearch(), this one is modifying rsearch()