ó •abc@`sGddlmZmZmZddlZddlmZddlmZyddl j j Z Wn#e k rƒddlj jZ nXddddd d d gZejdd koÂejd dkZy.edƒZeeeƒsòedƒZnWn eZnXeZdefd„ƒYZd„Zd„Zd„Zd„ZdS(i(tabsolute_importtdivisiontunicode_literalsN(t ModuleType(t text_typeu default_etreeuMethodDispatcheruisSurrogatePairusurrogatePairToCodepointumoduleFactoryFactoryusupports_lone_surrogatesuPY27iiiu"\uD800"u u"\uD800"tMethodDispatchercB`s#eZdZdd„Zd„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`sg}xi|D]a\}}t|ttttfƒr[x7|D]}|j||fƒq;Wq |j||fƒq Wtj||ƒd|_ dS(N( t isinstancetlistttuplet frozensettsettappendtdictt__init__tNonetdefault(tselftitemst _dictEntriestnametvaluetitem((s?/usr/lib/python2.7/site-packages/pip/_vendor/html5lib/_utils.pyR 4s cC`stj|||jƒS(N(R tgetR(Rtkey((s?/usr/lib/python2.7/site-packages/pip/_vendor/html5lib/_utils.pyt __getitem__Cs((t__name__t __module__t__doc__R R(((s?/usr/lib/python2.7/site-packages/pip/_vendor/html5lib/_utils.pyR's  cC`sht|ƒdkogt|dƒdkogt|dƒdkogt|dƒdkogt|dƒdkS(NiiiØiÿÛiiÜiÿß(tlentord(tdata((s?/usr/lib/python2.7/site-packages/pip/_vendor/html5lib/_utils.pytisSurrogatePairJs,cC`s2dt|dƒddt|dƒd}|S(NiiiØiiiÜ(R(Rtchar_val((s?/usr/lib/python2.7/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ˆ|s0    &   #