Viewing File: /lib/python3.6/site-packages/pip/_vendor/html5lib/_trie/__pycache__/datrie.cpython-36.opt-1.pyc

3

�Pf��@sLddlmZmZmZddlmZddlmZddl	mZ
Gdd�de
�ZdS)�)�absolute_import�division�unicode_literals)�Trie)�	text_type�c@sVeZdZdd�Zdd�Zdd�Zdd�Zd	d
�Zddd
�Zdd�Z	dd�Z
dd�ZdS)rcCsvt�}x:|j�D].}t|t�s&td��x|D]}|j|�q,WqWtdj|��|_x|j	�D]\}}||j|<q\WdS)NzAll keys must be strings�)
�set�keys�
isinstancer�	TypeError�add�DATrie�join�_data�items)�self�data�chars�key�char�value�r�/usr/lib/python3.6/datrie.py�__init__
s

z
Trie.__init__cCs
||jkS)N)r)rrrrr�__contains__szTrie.__contains__cCs
t|j�S)N)�lenr)rrrr�__len__szTrie.__len__cCs
t��dS)N)�NotImplementedError)rrrr�__iter__sz
Trie.__iter__cCs
|j|S)N)r)rrrrr�__getitem__szTrie.__getitem__NcCs|jj|�S)N)rr
)r�prefixrrrr
"sz	Trie.keyscCs|jj|�S)N)r�has_keys_with_prefix)rr!rrrr"%szTrie.has_keys_with_prefixcCs|jj|�S)N)r�longest_prefix)rr!rrrr#(szTrie.longest_prefixcCs|jj|�S)N)r�longest_prefix_item)rr!rrrr$+szTrie.longest_prefix_item)N)�__name__�
__module__�__qualname__rrrrr r
r"r#r$rrrrr	s
rN)Z
__future__rrrZdatrierrZpip._vendor.sixrZ_baseZABCTrierrrr�<module>s
Back to Directory File Manager
<