updated bst python

Generalized traversal to use function objects when it visits nodes.