• File: datrie.cpython-37.pyc
  • Full Path: /home3/farmfre2/public_html/ALFA_DATA/alfasymlink/root/opt/alt/python37/lib/python3.7/site-packages/html5lib/_trie/__pycache__/datrie.cpython-37.pyc
  • Date Modified: 07/08/2021 11:01 AM
  • File size: 1.93 KB
  • MIME-type: text/x-bytecode.python
  • Charset: 8 bit
B

63)Z@sLddlmZmZmZddlmZddlmZddl	mZ
Gddde
ZdS))absolute_importdivisionunicode_literals)Trie)	text_typec@sVeZdZddZddZddZddZd	d
Zddd
ZddZ	ddZ
ddZdS)rcCsvt}x:|D].}t|ts&tdx|D]}||q,WqWtd||_x|	D]\}}||j|<q\WdS)NzAll keys must be strings)
setkeys
isinstancer	TypeErroraddDATriejoin_dataitems)selfdatacharskeycharvaluerF/opt/alt/python37/lib/python3.7/site-packages/html5lib/_trie/datrie.py__init__
s

z
Trie.__init__cCs
||jkS)N)r)rrrrr__contains__szTrie.__contains__cCs
t|jS)N)lenr)rrrr__len__szTrie.__len__cCs
tdS)N)NotImplementedError)rrrr__iter__sz
Trie.__iter__cCs
|j|S)N)r)rrrrr__getitem__szTrie.__getitem__NcCs|j|S)N)rr
)rprefixrrrr
"sz	Trie.keyscCs|j|S)N)rhas_keys_with_prefix)rr!rrrr"%szTrie.has_keys_with_prefixcCs|j|S)N)rlongest_prefix)rr!rrrr#(szTrie.longest_prefixcCs|j|S)N)rlongest_prefix_item)rr!rrrr$+szTrie.longest_prefix_item)N)__name__
__module____qualname__rrrrr r
r"r#r$rrrrr	s
rN)Z
__future__rrrZdatrierrZsixrZ_baseZABCTrierrrr<module>s