Viewing File: /opt/alt/python35/lib/python3.5/site-packages/pip/_vendor/html5lib/_utils.pyc

ó
“tÆ_c@`s ddlmZmZmZddlmZyddlmZWn!ek
rcddl	mZnXddl
mZmZer•ddl
jjZn<yddljjZWn#ek
rÐddl
jjZnXdddd	d
dgZyCedƒZeeeƒs+ed
ƒZeeeƒs+t‚nWnek
rEeZnXeZdefd„ƒYZdefd„ƒYZd„Zd„Z d„Z!d„Z"dS(i(tabsolute_importtdivisiontunicode_literals(t
ModuleType(tMapping(t	text_typetPY3Nu
default_etreeuMethodDispatcheruisSurrogatePairusurrogatePairToCodepointumoduleFactoryFactoryusupports_lone_surrogatesu"\uD800"u	u"\uD800"tMethodDispatchercB`s/eZdZdd„Zd„Zdd„ZRS(upDict 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.
    cC`s­g}xi|D]a\}}t|ttttfƒr[x7|D]}|j||fƒq;Wq
|j||fƒq
Wtj||ƒt|ƒt|ƒks t	‚d|_dS(N(t
isinstancetlistttuplet	frozensettsettappendtdictt__init__tlentAssertionErrortNonetdefault(tselftitemst_dictEntriestnametvaluetitem((sL/opt/alt/python35/lib/python3.5/site-packages/pip/_vendor/html5lib/_utils.pyR9s
cC`stj|||jƒS(N(RtgetR(Rtkey((sL/opt/alt/python35/lib/python3.5/site-packages/pip/_vendor/html5lib/_utils.pyt__getitem__EscC`s
t||ƒS(N(tBoundMethodDispatcher(Rtinstancetowner((sL/opt/alt/python35/lib/python3.5/site-packages/pip/_vendor/html5lib/_utils.pyt__get__Hs(N(t__name__t
__module__t__doc__RRRR (((sL/opt/alt/python35/lib/python3.5/site-packages/pip/_vendor/html5lib/_utils.pyR,s	RcB`sDeZdZd„Zd„Zd„Zd„Zd„Zd„ZRS(uAWraps a MethodDispatcher, binding its return values to `instance`cC`s||_||_dS(N(Rt
dispatcher(RRR$((sL/opt/alt/python35/lib/python3.5/site-packages/pip/_vendor/html5lib/_utils.pyRNs	cC`s|j|j|jƒS(N(R$R R(RR((sL/opt/alt/python35/lib/python3.5/site-packages/pip/_vendor/html5lib/_utils.pyRRscC`s||jkr||S|SdS(N(R$(RRR((sL/opt/alt/python35/lib/python3.5/site-packages/pip/_vendor/html5lib/_utils.pyRWscC`s
t|jƒS(N(titerR$(R((sL/opt/alt/python35/lib/python3.5/site-packages/pip/_vendor/html5lib/_utils.pyt__iter__]scC`s
t|jƒS(N(RR$(R((sL/opt/alt/python35/lib/python3.5/site-packages/pip/_vendor/html5lib/_utils.pyt__len__`scC`s
||jkS(N(R$(RR((sL/opt/alt/python35/lib/python3.5/site-packages/pip/_vendor/html5lib/_utils.pyt__contains__cs(	R!R"R#RRRR&R'R((((sL/opt/alt/python35/lib/python3.5/site-packages/pip/_vendor/html5lib/_utils.pyRLs					cC`sht|ƒdkogt|dƒdkogt|dƒdkogt|dƒdkogt|dƒdkS(NiiiØiÿÛiiÜiÿß(Rtord(tdata((sL/opt/alt/python35/lib/python3.5/site-packages/pip/_vendor/html5lib/_utils.pytisSurrogatePairjs,cC`s2dt|dƒddt|dƒd}|S(NiiiØiiiÜ(R)(R*tchar_val((sL/opt/alt/python35/lib/python3.5/site-packages/pip/_vendor/html5lib/_utils.pytsurrogatePairToCodepointpsc`si‰‡‡fd†}|S(Nc`sttjtdƒƒr(d|j}n
d|j}t|jƒƒ}yˆ|||SWnµtk
rt|ƒ}ˆ|||Ž}|jj|ƒdˆkr²iˆ|<ndˆ|krÓiˆ||<ndˆ||krüiˆ|||<n|ˆ|||<|SXdS(Nuu_%s_factorys_%s_factoryunameuargsukwargs(	RRR!ttypeR
RtKeyErrort__dict__tupdate(t
baseModuletargstkwargsRtkwargs_tupletmodtobjs(tfactorytmoduleCache(sL/opt/alt/python35/lib/python3.5/site-packages/pip/_vendor/html5lib/_utils.pyt
moduleFactory|s$


((R8R:((R8R9sL/opt/alt/python35/lib/python3.5/site-packages/pip/_vendor/html5lib/_utils.pytmoduleFactoryFactoryysc`si‰‡‡fd†}|S(Nc`sHt|ƒt|jƒƒf}|ˆkr@ˆ||Žˆ|<nˆ|S(N(R
R(R3R4R(tcachetfunc(sL/opt/alt/python35/lib/python3.5/site-packages/pip/_vendor/html5lib/_utils.pytwrapped™s((R=R>((R<R=sL/opt/alt/python35/lib/python3.5/site-packages/pip/_vendor/html5lib/_utils.pytmemoize–s(#t
__future__RRRttypesRtcollections.abcRtImportErrortcollectionstpip._vendor.sixRRtxml.etree.ElementTreetetreetElementTreet
default_etreetxml.etree.cElementTreetcElementTreet__all__tevalt_xRRt	ExceptiontFalsetsupports_lone_surrogatestTrueRRRR+R-R;R?(((sL/opt/alt/python35/lib/python3.5/site-packages/pip/_vendor/html5lib/_utils.pyt<module>s:

			

 				
Back to Directory File Manager