U ÀÒ.e¯ ã @ sâ d dl mZmZmZ d dlmZ d dlmZ zd dlm m Z W n& ek rh d dl m mZ Y nX ddddd d gZzedƒZeeeƒs–edƒZW n d ZY nX dZG dd„ deƒZdd„ Zdd„ Zdd „ Zdd„ ZdS )é )Úabsolute_importÚdivisionÚunicode_literals)Ú ModuleType)Ú text_typeNÚ default_etreeÚMethodDispatcherÚisSurrogatePairÚsurrogatePairToCodepointÚmoduleFactoryFactoryÚsupports_lone_surrogatesz"\uD800"z u"\uD800"FTc @ s" e Zd ZdZddd„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 sb g }|D ]B\}}t |ttttfƒr<|D ]}| ||f¡ q&q| ||f¡ qt | |¡ d | _d S ©N) Ú isinstanceÚlistÚtupleÚ frozensetÚsetÚappendÚdictÚ__init__Údefault)ÚselfÚitemsZ_dictEntriesÚnameÚvalueÚitemr r ú?/usr/lib/python3.8/site-packages/pip/_vendor/html5lib/_utils.pyr 1 s zMethodDispatcher.__init__c C s t | || j¡S r )r Úgetr )r Úkeyr r r Ú__getitem__@ s zMethodDispatcher.__getitem__N)r )Ú__name__Ú __module__Ú__qualname__Ú__doc__r r r r r r r $ s c C sL t | ƒdkoJt| d ƒdkoJt| d ƒdkoJt| d ƒdkoJt| d ƒdkS )Né r é Ø iÿÛ é é Ü iÿß )ÚlenÚord)Údatar r r r G s ÿÿþþc C s, dt | d ƒd d t | d ƒd }|S )Ni r r&