I guess I don't see the benefit of sharing the same dict for forward and reverse lookups. It seems to leave open the possibility of not fully checking for invalid inputs. Admittedly the dict is private.