AlkantarClanX12

Your IP : 3.145.176.228


Current Path : /lib/python2.7/site-packages/pip/_vendor/urllib3/packages/
Upload File :
Current File : //lib/python2.7/site-packages/pip/_vendor/urllib3/packages/ordered_dict.pyo

�
��abc@s�yddlmZWn!ek
r7ddlmZnXy ddlmZmZmZWnek
rknXde	fd��YZ
dS(i����(t	get_ident(tKeysViewt
ValuesViewt	ItemsViewtOrderedDictcBseZdZd�Zejd�Zejd�Zd�Zd�Zd�Z	e
d�Zd�Zd	�Z
d
�Zd�Zd�Zd
�Zd�ZeZe�Zed�Zdd�Zid�Zd�Zd�Zedd��Zd�Zd�Zd�Z d�Z!d�Z"RS(s)Dictionary that remembers insertion ordercOs�t|�dkr+tdt|���ny|jWn7tk
rog|_}||dg|(i|_nX|j||�dS(s�Initialize an ordered dictionary.  Signature is the same as for
        regular dictionaries, but keyword arguments are not recommended
        because their insertion order is arbitrary.

        is$expected at most 1 arguments, got %dN(tlent	TypeErrort_OrderedDict__roottAttributeErrortNonet_OrderedDict__mapt_OrderedDict__update(tselftargstkwdstroot((sM/usr/lib/python2.7/site-packages/pip/_vendor/urllib3/packages/ordered_dict.pyt__init__s


cCs\||krH|j}|d}|||g|d<|d<|j|<n||||�dS(s!od.__setitem__(i, y) <==> od[i]=yiiN(RR
(Rtkeytvaluetdict_setitemRtlast((sM/usr/lib/python2.7/site-packages/pip/_vendor/urllib3/packages/ordered_dict.pyt__setitem__,s
	
)cCs@|||�|jj|�\}}}||d<||d<dS(s od.__delitem__(y) <==> del od[y]iiN(R
tpop(RRtdict_delitemt	link_prevt	link_next((sM/usr/lib/python2.7/site-packages/pip/_vendor/urllib3/packages/ordered_dict.pyt__delitem__6s

ccs=|j}|d}x#||k	r8|dV|d}qWdS(sod.__iter__() <==> iter(od)iiN(R(RRtcurr((sM/usr/lib/python2.7/site-packages/pip/_vendor/urllib3/packages/ordered_dict.pyt__iter__?s
	
	ccs=|j}|d}x#||k	r8|dV|d}qWdS(s#od.__reversed__() <==> reversed(od)iiN(R(RRR((sM/usr/lib/python2.7/site-packages/pip/_vendor/urllib3/packages/ordered_dict.pyt__reversed__Gs
	
	cCsmyHx|jj�D]
}|2qW|j}||dg|(|jj�Wntk
r[nXtj|�dS(s.od.clear() -> None.  Remove all items from od.N(R
t
itervaluesRR	tclearRtdict(RtnodeR((sM/usr/lib/python2.7/site-packages/pip/_vendor/urllib3/packages/ordered_dict.pyROs	
cCs�|std��n|j}|rO|d}|d}||d<||d<n(|d}|d}||d<||d<|d}|j|=tj||�}||fS(s�od.popitem() -> (k, v), return and remove a (key, value) pair.
        Pairs are returned in LIFO order if last is true or FIFO order if false.

        sdictionary is emptyiii(tKeyErrorRR
R R(RRRtlinkRRRR((sM/usr/lib/python2.7/site-packages/pip/_vendor/urllib3/packages/ordered_dict.pytpopitem[s 	









cCs
t|�S(sod.keys() -> list of keys in od(tlist(R((sM/usr/lib/python2.7/site-packages/pip/_vendor/urllib3/packages/ordered_dict.pytkeystscCsg|D]}||^qS(s#od.values() -> list of values in od((RR((sM/usr/lib/python2.7/site-packages/pip/_vendor/urllib3/packages/ordered_dict.pytvaluesxscCs!g|D]}|||f^qS(s.od.items() -> list of (key, value) pairs in od((RR((sM/usr/lib/python2.7/site-packages/pip/_vendor/urllib3/packages/ordered_dict.pytitems|scCs
t|�S(s0od.iterkeys() -> an iterator over the keys in od(titer(R((sM/usr/lib/python2.7/site-packages/pip/_vendor/urllib3/packages/ordered_dict.pytiterkeys�sccsx|D]}||VqWdS(s2od.itervalues -> an iterator over the values in odN((Rtk((sM/usr/lib/python2.7/site-packages/pip/_vendor/urllib3/packages/ordered_dict.pyR�s
ccs$x|D]}|||fVqWdS(s=od.iteritems -> an iterator over the (key, value) items in odN((RR+((sM/usr/lib/python2.7/site-packages/pip/_vendor/urllib3/packages/ordered_dict.pyt	iteritems�s
cOs&t|�dkr.tdt|�f��n|sCtd��n|d}d}t|�dkrr|d}nt|t�r�xw|D]}||||<q�WnXt|d�r�xF|j�D]}||||<q�Wn!x|D]\}}|||<q�Wx$|j�D]\}}|||<qWdS(	s�od.update(E, **F) -> None.  Update od from dict/iterable E and F.

        If E is a dict instance, does:           for k in E: od[k] = E[k]
        If E has a .keys() method, does:         for k in E.keys(): od[k] = E[k]
        Or if E is an iterable of items, does:   for k, v in E: od[k] = v
        In either case, this is followed by:     for k, v in F.items(): od[k] = v

        is8update() takes at most 2 positional arguments (%d given)s,update() takes at least 1 argument (0 given)iiR&N((RRt
isinstanceR thasattrR&R((R
RRtotherRR((sM/usr/lib/python2.7/site-packages/pip/_vendor/urllib3/packages/ordered_dict.pytupdate�s&	


cCsC||kr!||}||=|S||jkr?t|��n|S(s�od.pop(k[,d]) -> v, remove specified key and return the corresponding value.
        If key is not found, d is returned if given, otherwise KeyError is raised.

        (t_OrderedDict__markerR"(RRtdefaulttresult((sM/usr/lib/python2.7/site-packages/pip/_vendor/urllib3/packages/ordered_dict.pyR�s
cCs"||kr||S|||<|S(sDod.setdefault(k[,d]) -> od.get(k,d), also set od[k]=d if k not in od((RRR2((sM/usr/lib/python2.7/site-packages/pip/_vendor/urllib3/packages/ordered_dict.pyt
setdefault�s
cCsst|�t�f}||kr%dSd||<z5|sId|jjfSd|jj|j�fSWd||=XdS(sod.__repr__() <==> repr(od)s...is%s()s%s(%r)N(tidt
_get_identt	__class__t__name__R((Rt
_repr_runningtcall_key((sM/usr/lib/python2.7/site-packages/pip/_vendor/urllib3/packages/ordered_dict.pyt__repr__�s
cCs�g|D]}|||g^q}t|�j�}x'tt��D]}|j|d�qEW|rx|j|f|fS|j|ffS(s%Return state information for picklingN(tvarstcopyRRR	R7(RR+R(t	inst_dict((sM/usr/lib/python2.7/site-packages/pip/_vendor/urllib3/packages/ordered_dict.pyt
__reduce__�s#cCs
|j|�S(s!od.copy() -> a shallow copy of od(R7(R((sM/usr/lib/python2.7/site-packages/pip/_vendor/urllib3/packages/ordered_dict.pyR=�scCs(|�}x|D]}|||<qW|S(s�OD.fromkeys(S[, v]) -> New ordered dictionary with keys from S
        and values equal to v (which defaults to None).

        ((tclstiterableRtdR((sM/usr/lib/python2.7/site-packages/pip/_vendor/urllib3/packages/ordered_dict.pytfromkeys�s	
cCsMt|t�r=t|�t|�ko<|j�|j�kStj||�S(s�od.__eq__(y) <==> od==y.  Comparison to another OD is order-sensitive
        while comparison to a regular mapping is order-insensitive.

        (R-RRR(R t__eq__(RR/((sM/usr/lib/python2.7/site-packages/pip/_vendor/urllib3/packages/ordered_dict.pyRD�s.cCs||kS(N((RR/((sM/usr/lib/python2.7/site-packages/pip/_vendor/urllib3/packages/ordered_dict.pyt__ne__�scCs
t|�S(s@od.viewkeys() -> a set-like object providing a view on od's keys(R(R((sM/usr/lib/python2.7/site-packages/pip/_vendor/urllib3/packages/ordered_dict.pytviewkeys�scCs
t|�S(s<od.viewvalues() -> an object providing a view on od's values(R(R((sM/usr/lib/python2.7/site-packages/pip/_vendor/urllib3/packages/ordered_dict.pyt
viewvalues�scCs
t|�S(sBod.viewitems() -> a set-like object providing a view on od's items(R(R((sM/usr/lib/python2.7/site-packages/pip/_vendor/urllib3/packages/ordered_dict.pyt	viewitemssN(#R8t
__module__t__doc__RR RRRRRtTrueR$R&R'R(R*RR,R0RtobjectR1RR	R4R;R?R=tclassmethodRCRDRERFRGRH(((sM/usr/lib/python2.7/site-packages/pip/_vendor/urllib3/packages/ordered_dict.pyRs:	
												

	
	
					N(tthreadRR6tImportErrortdummy_threadt_abcollRRRR R(((sM/usr/lib/python2.7/site-packages/pip/_vendor/urllib3/packages/ordered_dict.pyt<module>s