Viewing File: /usr/lib/python3.6/site-packages/pip/_vendor/html5lib/__pycache__/_utils.cpython-36.pyc
3
£éaj ã @ s
d dl mZmZmZ d dlZd dlmZ d dlmZ yd dl j
jZW n e
k
rd d dlj
jZY nX ddddd d
dgZejd dko’ejd
dkZy,edƒZeeeƒs¾edƒZeeeƒs¾t‚W n dZY nX dZG dd„ deƒZdd„ Zdd„ Zdd „ Zdd„ ZdS )é )Úabsolute_importÚdivisionÚunicode_literalsN)Ú
ModuleType)Ú text_typeÚ
default_etreeÚMethodDispatcherÚisSurrogatePairÚsurrogatePairToCodepointÚmoduleFactoryFactoryÚsupports_lone_surrogatesÚPY27é é é z"\uD800"z u"\uD800"FTc @ s$ e Zd ZdZf fdd„Zdd„ ZdS )r ap Dict with 2 special properties:
On initiation, keys that are lists, sets or tuples are converted to
multiple keys so accessing any one of the items in the original
list-like object returns the matching value
md = MethodDispatcher({("foo", "bar"):"baz"})
md["foo"] == "baz"
A default value which can be set through the default attribute.
c C s~ g }xN|D ]F\}}t |ttttfƒrBx*|D ]}|j||fƒ q*W q
|j||fƒ q
W tj| |ƒ t| ƒt|ƒkstt ‚d | _
d S )N)Ú
isinstanceÚlistÚtupleÚ frozensetÚsetÚappendÚdictÚ__init__ÚlenÚAssertionErrorÚdefault)ÚselfÚitemsZ_dictEntriesÚnameÚvalueÚitem© r! ú/usr/lib/python3.6/_utils.pyr 4 s
zMethodDispatcher.__init__c C s t j| || jƒS )N)r Úgetr )r Úkeyr! r! r"