‹“ReC ã @ s¬ d d l m Z m Z m Z d d l m Z y d d l m Z Wn" e k rd d d l m Z Yn Xd d l m Z m Z e r– d d l j j Z n= y d d l j j Z Wn$ e k rÒ d d l j j Z Yn Xd d d d d d g Z y@ e d ƒ Z e e e ƒ s*e d ƒ Z e e e ƒ s*t ‚ Wn e k rEd Z Yn Xd Z Gd d „ d e ƒ Z Gd d „ d e ƒ Z d d „ Z d d „ Z d d „ Z d d „ Z d S)é )Ú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 Z d Z d Z f d d „ Z d d „ Z d d d „ Z d S) 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 } xi | D]a \ } } t | t t t t f ƒ r[ x7 | D] } | j | | f ƒ q; Wq | j | | f ƒ q Wt j | | ƒ t | ƒ t | ƒ k s t ‚ 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-python35-pip-20.2.4-5.el8.x86_64/opt/alt/python35/lib/python3.5/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__)Ú__name__Ú __module__Ú__qualname__Ú__doc__r r$ r( r r r r! r , s c @ s^ e Z d Z d Z d d „ Z d d „ Z d d „ Z d d „ Z d d „ Z d d „ Z d S)r% zAWraps a MethodDispatcher, binding its return values to `instance`c C s | | _ | | _ d S)N)r&