Hacked By AnonymousFox

Current Path : /usr/lib/python2.7/site-packages/pip/_vendor/html5lib/
Upload File :
Current File : //usr/lib/python2.7/site-packages/pip/_vendor/html5lib/_utils.pyc

�
��abc@`s\ddlmZmZmZddlZddlmZddlmZyddl	j
jZWn#e
k
r�ddlj
jZnXddddd	d
dgZejddko�ejd
dkZyCed�Zeee�sed�Zeee�st�nWn
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`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((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��(Rtord(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�|<nd�|kr�i�||<nd�||kr�i�|||<n|�|||<|SXdS(Nuu_%s_factorys_%s_factoryunameuargsukwargs(	RRRttypeRRtKeyErrort__dict__tupdate(t
baseModuletargstkwargsRtkwargs_tupletmodtobjs(tfactorytmoduleCache(s?/usr/lib/python2.7/site-packages/pip/_vendor/html5lib/_utils.pyt
moduleFactory\s$


((R-R/((R-R.s?/usr/lib/python2.7/site-packages/pip/_vendor/html5lib/_utils.pytmoduleFactoryFactoryYsc`si���fd�}|S(Nc`sHt|�t|j��f}|�kr@�||��|<n�|S(N(RR(R(R)R(tcachetfunc(s?/usr/lib/python2.7/site-packages/pip/_vendor/html5lib/_utils.pytwrappedys((R2R3((R1R2s?/usr/lib/python2.7/site-packages/pip/_vendor/html5lib/_utils.pytmemoizevs( t
__future__RRRtsysttypesRtpip._vendor.sixRtxml.etree.cElementTreetetreetcElementTreet
default_etreetImportErrortxml.etree.ElementTreetElementTreet__all__tversion_infotPY27tevalt_xRRtFalsetsupports_lone_surrogatestTrueRRR R"R0R4(((s?/usr/lib/python2.7/site-packages/pip/_vendor/html5lib/_utils.pyt<module>s0
	&
#				

Hacked By AnonymousFox1.0, Coded By AnonymousFox