¡@

Home 

java Programming Glossary: keyerror

Implementing a Patricia Trie for use as a dictionary

http://stackoverflow.com/questions/2406416/implementing-a-patricia-trie-for-use-as-a-dictionary

self._data i 0 while 1 try node data word i i 1 except KeyError if data data word i i 1 word i 1 else if word i i 1 '' .. len word i len node 0 if node 1 try node 1 '' except KeyError data node 1 data '' '' return else i len node 0 data node.. self._data i 0 while 1 try node data word i i 1 except KeyError return False i 1 if word.startswith node 0 i if len word i..