datrie
datrie copied to clipboard
validate keys at insertion time
Currently inserting a key with non-mapped letters leads to a no-op. Maybe we should validate the key and throw a ValueError in this case.
>>> import datrie
>>> trie = datrie.Trie("a")
>>> trie["ab"] = 42
>>> len(trie)
0