The .find method can be used to see if any words in the trie start with a certain prefix, but it becomes expensive if there are a lot of matches returned. The .has method already does the work needed, I think, but then always checks if the whole word exists. Perhaps rather than making a separate method, a second arg could be added to the .has method. Or perhaps the .has method could be a wrapper of a new .has_prefix method? In any case, it's a trivial change that would make this module more useful.
The .find method can be used to see if any words in the trie start with a certain prefix, but it becomes expensive if there are a lot of matches returned. The .has method already does the work needed, I think, but then always checks if the whole word exists. Perhaps rather than making a separate method, a second arg could be added to the .has method. Or perhaps the .has method could be a wrapper of a new .has_prefix method? In any case, it's a trivial change that would make this module more useful.