3 ƒ”ReC ã @ sD d dl mZmZmZ d dlmZ yd dlmZ W n ek rP d dl mZ Y nX d dl mZmZ ertd dl jjZn2yd dljjZW n ek r¤ d dl jjZY nX dddd d dgZy,edƒZeeeƒsàed ƒZeeeƒsàt‚W n ek rú dZY nX dZG dd„ deƒZG dd„ deƒZdd„ Zdd „ Zdd „ Zdd„ Z dS )é )Úabsolute_importÚdivisionÚunicode_literals)Ú ModuleType)ÚMapping)Ú text_typeÚPY3NÚ default_etreeÚMethodDispatcherÚisSurrogatePairÚsurrogatePairToCodepointÚmoduleFactoryFactoryÚsupports_lone_surrogatesz"\uD800"z u"\uD800"FTc @ s. e Zd ZdZf fdd„Zdd„ Zd dd„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ÚitemsÚ_dictEntriesÚnameÚvalueÚitem© r úŠ/builddir/build/BUILDROOT/alt-python36-pip-20.2.4-5.el9.x86_64/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/html5lib/_utils.pyr 9 s zMethodDispatcher.__init__c C s t j| || jƒS )N)r Úgetr )r Úkeyr r r! Ú__getitem__E s zMethodDispatcher.__getitem__Nc C s t || ƒS )N)ÚBoundMethodDispatcher)r ÚinstanceÚownerr r r! Ú__get__H s zMethodDispatcher.__get__)N)Ú__name__Ú __module__Ú__qualname__Ú__doc__r r$ r( r r r r! r , s c @ s@ e Zd ZdZdd„ Zdd„ Zdd„ Zdd „ Zd d„ Zdd „ Z dS )r% zAWraps a MethodDispatcher, binding its return values to `instance`c C s || _ || _d S )N)r&