datrie icon indicating copy to clipboard operation
datrie copied to clipboard

validate keys at insertion time

Open kmike opened this issue 13 years ago • 1 comments

kmike avatar Aug 01 '12 12:08 kmike

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

superbobry avatar May 02 '15 22:05 superbobry