“tÆ_Cã@s¬ddlmZmZmZddlmZyddlmZWn"ek rdddl mZYnXddl m Z m Z e r–ddl jjZn=yddljjZWn$ek rÒddl jjZYnXdddd d d gZy@ed ƒZeee ƒs*ed ƒZeee ƒs*t‚Wnek rEdZYnXdZGdd„deƒZGdd„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@eZdZdZfdd„Zdd„Zddd„ZdS) r apDict 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. cCs­g}xi|D]a\}}t|ttttfƒr[x7|D]}|j||fƒq;Wq |j||fƒq Wtj||ƒt|ƒt|ƒks t ‚d|_ dS)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-1.el7.x86_64/opt/alt/python35/lib/python3.5/site-packages/pip/_vendor/html5lib/_utils.pyr9s zMethodDispatcher.__init__cCstj|||jƒS)N)rÚgetr)rÚkeyr r r!Ú __getitem__EszMethodDispatcher.__getitem__NcCs t||ƒS)N)ÚBoundMethodDispatcher)rÚinstanceÚownerr r r!Ú__get__HszMethodDispatcher.__get__)Ú__name__Ú __module__Ú __qualname__Ú__doc__rr$r(r r r r!r ,s  c@s^eZdZdZdd„Zdd„Zdd„Zdd „Zd d „Zd d „Z dS)r%zAWraps a MethodDispatcher, binding its return values to `instance`cCs||_||_dS)N)r&Ú dispatcher)rr&r-r r r!rNs zBoundMethodDispatcher.__init__cCs|j|j|jƒS)N)r-r(r&)rr#r r r!r$Rsz!BoundMethodDispatcher.__getitem__cCs||jkr||S|SdS)N)r-)rr#rr r r!r"WszBoundMethodDispatcher.getcCs t|jƒS)N)Úiterr-)rr r r!Ú__iter__]szBoundMethodDispatcher.__iter__cCs t|jƒS)N)rr-)rr r r!Ú__len__`szBoundMethodDispatcher.__len__cCs ||jkS)N)r-)rr#r r r!Ú __contains__csz"BoundMethodDispatcher.__contains__N) r)r*r+r,rr$r"r/r0r1r r r r!r%Ls      r%cCsht|ƒdkogt|dƒdkogt|dƒdkogt|dƒdkogt|dƒdkS)NériØiÿÛéiÜiÿß)rÚord)Údatar r r!r js,cCs2dt|dƒddt|dƒd}|S)NiriØir3iÜ)r4)r5Úchar_valr r r!r pscsi‰‡‡fdd†}|S)Nc sttjtdƒƒr(d|j}n d|j}t|jƒƒ}yˆ|||SWn°tk r t|ƒ}ˆ|||Ž}|jj|ƒdˆkr¯iˆ|.moduleFactoryr )rBrDr )rBrCr!r yscsi‰‡‡fdd†}|S)NcsEt|ƒt|jƒƒf}|ˆkr=ˆ||Žˆ|<ˆ|S)N)rr)r8r9r#)ÚcacheÚfuncr r!Úwrapped™s zmemoize..wrappedr )rFrGr )rErFr!Úmemoize–srH)!Ú __future__rrrÚtypesrÚcollections.abcrÚ ImportErrorÚ collectionsZpip._vendor.sixrrÚxml.etree.ElementTreeÚetreeÚ ElementTreer Zxml.etree.cElementTreeZ cElementTreeÚ__all__ÚevalÚ_xrrÚ Exceptionrrr r%r r r rHr r r r!Ús: