A pure Python implementation of a trie with typing.
Project description
typed-trie
A pure Python implementation of trie with typing.
Usage
>>> from typed_trie import Trie
>>>
>>> trie = Trie()
>>> trie["how to cook"] = 1
>>> trie["how to swim"] = 2
>>> trie["who is john doe"] = 3
>>> list(trie.items_by_prefix("how to"))
[('how to cook', 1), ('how to swim', 2)]
>>> del trie["how to cook"]
License
typed-trie
is distributed under the terms of the MIT license.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
typed_trie-0.1.0.tar.gz
(2.6 kB
view hashes)
Built Distribution
Close
Hashes for typed_trie-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3de47090e880539b5e0afa25e3cbb7606e001023d79b4ea017d4c82f9f7e600c |
|
MD5 | aa81beb4cf772777a4903f031b173f7d |
|
BLAKE2b-256 | 3c1528795dec19951f49eb5c21a76099849b5022e2013d75f8cac1216e0e449f |