Basic implementation of a BST-based dictionary in Python