abc@`s\ddlmZmZmZddlZddlmZddlmZyddl j j Z Wn#e k rddlj jZ nXddddd d d gZejdd koejd dkZyCedZeeesedZeeestnWn eZnXeZdefdYZdZdZdZdZdS(i(tabsolute_importtdivisiontunicode_literalsN(t ModuleType(t text_typeu default_etreeuMethodDispatcheruisSurrogatePairusurrogatePairToCodepointumoduleFactoryFactoryusupports_lone_surrogatesuPY27iiiu"\uD800"u u"\uD800"tMethodDispatchercB`s#eZdZddZdZRS(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|ttttfr[x7|D]}|j||fq;Wq |j||fq Wtj||t|t|kst d|_ dS(N( t isinstancetlistttuplet frozensettsettappendtdictt__init__tlentAssertionErrortNonetdefault(tselftitemst _dictEntriestnametvaluetitem((s?/usr/lib/python2.7/site-packages/pip/_vendor/html5lib/_utils.pyR 4s cC`stj|||jS(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|ddkogt|ddkogt|ddkogt|ddkS(Niiiiiii(Rtord(tdata((s?/usr/lib/python2.7/site-packages/pip/_vendor/html5lib/_utils.pytisSurrogatePairJs,cC`s2dt|dddt|dd}|S(Niiiiii(R(Rtchar_val((s?/usr/lib/python2.7/site-packages/pip/_vendor/html5lib/_utils.pytsurrogatePairToCodepointPsc`sifd}|S(Nc`sttjtdr(d|j}n d|j}t|j}y|||SWntk rt|}|||}|jj|dkri|s0    &   #