Spade
Mini Shell
| Directory:~$ /lib/python2.7/site-packages/future/backports/ |
| [Home] [System Details] [Kill Me] |
�
,�]c@@s�dZddlmZddlZddlmZddlmZ m
ZddlZddl
ZddlmZddlmZmZmZddlmZmZmZmZdd lmZmZm
Z m!Z!m"Z"e r�dd
l#m$Z$m%Z%ndd
l&m$Z$m%Z%d�Zddlm'Z'e"reydd
l(m)Z)Wn!e*k
radd
l+m)Z)nXn8ydd
l,m)Z)Wn!e*k
r�dd
l-m)Z)nXdd�Z.de/fd��YZ0de1fd��YZ2y$ddlmZddl
m3Z3Wne*k
rnXd�Z4de1fd��YZ5d�Z6ddd�Z7de%fd��YZ8ddlm9Z9e9e:d�Z;d
�Z<e2Z=e5Z>e6Z?e7Z@eZAe4ZBe.ZCe8ZDe;ZEe<ZFejGd!d"fkrDdd#l#m2Z2m5Z5dd$lm7Z7dd%lHm<Z<ydd&lm6Z6Wne*k
r0nXdd'lm;Z;nejGd(dfkr|ddlmZdd)l#m4Z4nejGd(d(fkr�dd*lIm.Z.dd+l#m8Z8ndS(,s�
Miscellaneous function (re)definitions from the Py3.4+ standard library
for Python 2.6/2.7.
- math.ceil (for Python 2.7)
- collections.OrderedDict (for Python 2.6)
- collections.Counter (for Python 2.6)
- collections.ChainMap (for all versions prior to Python 3.3)
- itertools.count (for Python 2.6, with step parameter)
- subprocess.check_output (for Python 2.6)
- reprlib.recursive_repr (for Python 2.6+)
- functools.cmp_to_key (for Python 2.6)
i(tabsolute_importN(tceil(t
itemgetterteq(tproxy(trepeattchaintstarmap(tgetaddrinfotSOCK_STREAMterrortsocket(t iteritemst
itervaluestPY2tPY26tPY3(tMappingtMutableMappingcC@stt|��S(sZ
Return the ceiling of x as an int.
This is the smallest integral value >= x.
(tinttoldceil(tx((s9/usr/lib/python2.7/site-packages/future/backports/misc.pyR#s(tislice(t get_idents...c@s�fd�}|S(sGDecorator
to make a repr function return fillvalue for a recursive
callc@smt�����fd�}t�d�|_t�d�|_t�d�|_t�di�|_|S(Nc@sWt|�t�f}|�kr%�S�j|�z�|�}Wd�j|�X|S(N(tidRtaddtdiscard(tselftkeytresult(t fillvaluetrepr_runningt
user_function(s9/usr/lib/python2.7/site-packages/future/backports/misc.pytwrapperCs
t
__module__t__doc__t__name__t__annotations__(tsettgetattrR"R#R$R%(R
R!(R(RR
s9/usr/lib/python2.7/site-packages/future/backports/misc.pytdecorating_function@s ((RR(((Rs9/usr/lib/python2.7/site-packages/future/backports/misc.pytrecursive_repr=st_LinkcB@seZdZRS(tprevtnextRt__weakref__(sprevsnextskeys__weakref__(R$R"t __slots__(((s9/usr/lib/python2.7/site-packages/future/backports/misc.pyR*\stOrderedDictcB@seZdZd�Zejeed�Zejd�Zd�Z d�Z
d�Zed�Z
ed�Zd �ZejZZejZejZejZejZe�Zed
�Zdd�Ze�d��Zd
�Zd�Ze
dd��Z!d�Z"RS(s)Dictionary that remembers insertion
ordercO@s�|std��n|d}|d}t|�dkrTtdt|���ny|jWnLtk
r�t�|_t|j�|_}||_|_i|_ nX|j
||�dS(s�Initialize an ordered dictionary. The signature is the
same as
regular dictionaries, but keyword arguments are not recommended
because
their insertion order is arbitrary.
s?descriptor '__init__' of 'OrderedDict' object
needs an argumentiis$expected at most 1 arguments, got
%dN(t TypeErrortlent_OrderedDict__roottAttributeErrorR*t_OrderedDict__hardroott_proxyR+R,t_OrderedDict__mapt_OrderedDict__update(targstkwdsRtroot((s9/usr/lib/python2.7/site-packages/future/backports/misc.pyt__init__ns
c C@s~||krj|�|j|<}|j}|j}||||_|_|_||_||�|_n||||�dS(s!od.__setitem__(i,
y) <==>
od[i]=yN(R6R2R+R,R( RRtvaluetdict_setitemRtLinktlinkR:tlast((s9/usr/lib/python2.7/site-packages/future/backports/misc.pyt__setitem__�s cC@sG|||�|jj|�}|j}|j}||_||_dS(s
od.__delitem__(y) <==> del
od[y]N(R6tpopR+R,(RRtdict_delitemR?t link_prevt link_next((s9/usr/lib/python2.7/site-packages/future/backports/misc.pyt__delitem__�s
cc@s:|j}|j}x!||k r5|jV|j}qWdS(sod.__iter__()
<==>
iter(od)N(R2R,R(RR:tcurr((s9/usr/lib/python2.7/site-packages/future/backports/misc.pyt__iter__�s
cc@s:|j}|j}x!||k r5|jV|j}qWdS(s#od.__reversed__()
<==>
reversed(od)N(R2R+R(RR:RG((s9/usr/lib/python2.7/site-packages/future/backports/misc.pyt__reversed__�s
cC@s7|j}||_|_|jj�tj|�dS(s.od.clear() ->
None. Remove all items from
od.N(R2R+R,R6tcleartdict(RR:((s9/usr/lib/python2.7/site-packages/future/backports/misc.pyRJ�s
cC@s�|std��n|j}|rK|j}|j}||_||_n$|j}|j}||_||_|j}|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
empty(tKeyErrorR2R+R,RR6RKRB(RR@R:R?RDRERR<((s9/usr/lib/python2.7/site-packages/future/backports/misc.pytpopitem�s
cC@s�|j|}|j}|j}||_||_|j}|rn|j}||_||_||_|_n+|j}||_||_||_|_dS(s�Move
an existing element to the end (or beginning if last==False).
Raises KeyError if the element does not exist.
When last=True, acts like a fast version of
self[key]=self.pop(key).
N(R6R+R,R2(RRR@R?RDRER:tfirst((s9/usr/lib/python2.7/site-packages/future/backports/misc.pytmove_to_end�s
cC@sqtj}t|�d}||j�}|||j�d7}|||j�|7}|||j�|7}|S(Nii(tsyst getsizeofR1t__dict__R6R4R2(Rtsizeoftntsize((s9/usr/lib/python2.7/site-packages/future/backports/misc.pyt
__sizeof__�s cC@sC||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__markerRL(RRtdefaultR((s9/usr/lib/python2.7/site-packages/future/backports/misc.pyRB�s
cC@s"||kr||S|||<|S(sDod.setdefault(k[,d])
-> od.get(k,d), also set od[k]=d if k not in
od((RRRX((s9/usr/lib/python2.7/site-packages/future/backports/misc.pyt
setdefaults
cC@s7|sd|jjfSd|jjt|j��fS(sod.__repr__() <==>
repr(od)s%s()s%s(%r)(t __class__R$tlisttitems(R((s9/usr/lib/python2.7/site-packages/future/backports/misc.pyt__repr__scC@sdt|�j�}x'tt��D]}|j|d�q"W|jd|pNddt|j��fS(s%Return
state information for
picklingN((tvarstcopyR/RBtNoneRZtiterR\(Rt inst_dicttk((s9/usr/lib/python2.7/site-packages/future/backports/misc.pyt
__reduce__scC@s
|j|�S(s!od.copy() -> a shallow copy of
od(RZ(R((s9/usr/lib/python2.7/site-packages/future/backports/misc.pyR_scC@s(|�}x|D]}|||<qW|S(sOD.fromkeys(S[,
v]) -> New ordered dictionary with keys from S.
If not specified, the value defaults to None.
((tclstiterableR<RR((s9/usr/lib/python2.7/site-packages/future/backports/misc.pytfromkeyss
cC@sGt|t�r7tj||�o6ttt||��Stj||�S(s�od.__eq__(y)
<==> od==y. Comparison to another OD is order-sensitive
while comparison to a regular mapping is order-insensitive.
(t
isinstanceR/RKt__eq__talltmapt_eq(Rtother((s9/usr/lib/python2.7/site-packages/future/backports/misc.pyRi(s(N(#R$R"R#R;RKRAR5R*RFRHRIRJtTrueRMRORVRtupdateR7tkeystvaluesR\t__ne__tobjectRWRBR`RYR)R]RdR_tclassmethodRgRi(((s9/usr/lib/python2.7/site-packages/future/backports/misc.pyR/_s0
(R(tnlargestcC@s5|j}x%|D]}||d�d||<qWdS(s!Tally
elements from the
iterable.iiN(tget(tmappingRftmapping_gettelem((s9/usr/lib/python2.7/site-packages/future/backports/misc.pyt_count_elements>s
tCountercB@s�eZdZd�Zd�Zdd�Zd�Zedd��Z d�Z
d�Zd�Zd �Z
d
�Zd�Zd�Zd
�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�ZRS(s�Dict
subclass for counting hashable items. Sometimes called a bag
or multiset. Elements are stored as dictionary keys and their counts
are stored as dictionary values.
>>> c = Counter('abcdeabcdabcaba') # count elements
from a string
>>> c.most_common(3) # three most common
elements
[('a', 5), ('b', 4), ('c', 3)]
>>> sorted(c) # list all unique elements
['a', 'b', 'c', 'd',
'e']
>>> ''.join(sorted(c.elements())) # list elements
with repetitions
'aaaaabbbbcccdde'
>>> sum(c.values()) # total of all counts
15
>>> c['a'] # count of
letter 'a'
5
>>> for elem in 'shazam': # update counts
from an iterable
... c[elem] += 1 # by adding 1 to each
element's count
>>> c['a'] # now there are
seven 'a'
7
>>> del c['b'] # remove all
'b'
>>> c['b'] # now there are
zero 'b'
0
>>> d = Counter('simsalabim') # make another
counter
>>> c.update(d) # add in the second
counter
>>> c['a'] # now there are
nine 'a'
9
>>> c.clear() # empty the counter
>>> c
Counter()
Note: If a count is set to zero or reduced to zero, it will remain
in the counter until the entry is deleted or the counter is cleared:
>>> c = Counter('aaabbc')
>>> c['b'] -= 2 # reduce the
count of 'b' by two
>>> c.most_common() # 'b' is still
in, but its count is zero
[('a', 3), ('c', 1), ('b', 0)]
cO@s{|std��n|d}|d}t|�dkrTtdt|���ntt|�j�|j||�dS(s Create
a new, empty Counter object. And if given, count elements
from an input iterable. Or, initialize the count from another
mapping
of elements to their counts.
>>> c = Counter() # a new, empty
counter
>>> c = Counter('gallahad') # a
new counter from an iterable
>>> c = Counter({'a': 4, 'b': 2})
# a new counter from a mapping
>>> c = Counter(a=4, b=2) # a new
counter from keyword args
s;descriptor '__init__' of 'Counter' object
needs an argumentiis$expected at most 1 arguments, got
%dN(R0R1tsuperR{R;Ro(R8R9R((s9/usr/lib/python2.7/site-packages/future/backports/misc.pyR;ws
cC@sdS(s1The count of elements not in the Counter is
zero.i((RR((s9/usr/lib/python2.7/site-packages/future/backports/misc.pyt__missing__�scC@sP|dkr.t|j�dtd�dt�Stj||j�dtd��S(s�List
the n most common elements and their counts from the most
common to the least. If n is None, then list all element counts.
>>> Counter('abcdeabcdabcaba').most_common(3)
[('a', 5), ('b', 4), ('c', 3)]
RitreverseN(R`tsortedR\t_itemgetterRnt_heapqRu(RRT((s9/usr/lib/python2.7/site-packages/future/backports/misc.pytmost_common�s "cC@stjtt|j���S(s�Iterator
over elements repeating each as many times as its count.
>>> c = Counter('ABCABC')
>>> sorted(c.elements())
['A', 'A', 'B', 'B',
'C', 'C']
# Knuth's example for prime factors of 1836: 2**2 * 3**3 *
17**1
>>> prime_factors = Counter({2: 2, 3: 3, 17: 1})
>>> product = 1
>>> for factor in prime_factors.elements(): # loop
over factors
... product *= factor # and multiply them
>>> product
1836
Note, if an element's count has been set to zero or is a
negative
number, elements() will ignore it.
(t_chaint
from_iterablet_starmapt_repeatR\(R((s9/usr/lib/python2.7/site-packages/future/backports/misc.pytelements�scC@std��dS(Ns@Counter.fromkeys()
is undefined. Use Counter(iterable)
instead.(tNotImplementedError(ReRftv((s9/usr/lib/python2.7/site-packages/future/backports/misc.pyRg�scO@s|std��n|d}|d}t|�dkrTtdt|���n|rd|dnd}|dk r�t|t�r�|r�|j}xJ|j�D]#\}}|||d�||<q�Wq�tt|�j |�q�t
||�n|r
|j |�ndS(s�Like dict.update() but add counts instead of
replacing them.
Source can be an iterable, a dictionary, or another Counter
instance.
>>> c = Counter('which')
>>> c.update('witch') # add elements
from another iterable
>>> d = Counter('watch')
>>> c.update(d) # add elements from
another counter
>>> c['h'] # four
'h' in which, witch, and watch
4
s9descriptor 'update' of 'Counter' object needs
an argumentiis$expected at most 1 arguments, got
%dN(R0R1R`RhRRvR\R|R{RoRz(R8R9RRftself_getRytcount((s9/usr/lib/python2.7/site-packages/future/backports/misc.pyRo�s"
cO@s
|std��n|d}|d}t|�dkrTtdt|���n|rd|dnd}|dk r�|j}t|t�r�x\|j�D]#\}}||d�|||<q�Wq�x(|D]}||d�d||<q�Wn|r|j|�ndS(s�Like
dict.update() but subtracts counts instead of replacing them.
Counts can be reduced below zero. Both the inputs and outputs are
allowed to contain zero and negative counts.
Source can be an iterable, a dictionary, or another Counter
instance.
>>> c = Counter('which')
>>> c.subtract('witch') # subtract
elements from another iterable
>>> c.subtract(Counter('watch')) # subtract
elements from another counter
>>> c['h'] # 2 in
which, minus 1 in witch, minus 1 in watch
0
>>> c['w'] # 1 in
which, minus 1 in witch, minus 1 in watch
-1
s;descriptor 'subtract' of 'Counter' object
needs an argumentiis$expected at most 1 arguments, got
%dN(R0R1R`RvRhRR\tsubtract(R8R9RRfR�RyR�((s9/usr/lib/python2.7/site-packages/future/backports/misc.pyR��s
cC@s
|j|�S(sReturn a shallow
copy.(RZ(R((s9/usr/lib/python2.7/site-packages/future/backports/misc.pyR_ scC@s|jt|�ffS(N(RZRK(R((s9/usr/lib/python2.7/site-packages/future/backports/misc.pyRd
scC@s)||kr%tt|�j|�ndS(sGLike
dict.__delitem__() but does not raise KeyError for missing
values.N(R|R{RF(RRy((s9/usr/lib/python2.7/site-packages/future/backports/misc.pyRFscC@s~|sd|jjSy9djtdj|j���}d|jj|fSWn*tk
rydj|jjt|��SXdS(Ns%s()s, s%r: %rs%s({%s})s
{0}({1!r})( RZR$tjoinRkt__mod__R�R0tformatRK(RR\((s9/usr/lib/python2.7/site-packages/future/backports/misc.pyR]s!
cC@s�t|t�stSt�}xA|j�D]3\}}|||}|dkr)|||<q)q)Wx?|j�D]1\}}||krm|dkrm|||<qmqmW|S(sAdd
counts from two counters.
>>> Counter('abbb') + Counter('bcc')
Counter({'b': 4, 'c': 2, 'a': 1})
i(RhR{tNotImplementedR\(RRmRRyR�tnewcount((s9/usr/lib/python2.7/site-packages/future/backports/misc.pyt__add__(s cC@s�t|t�stSt�}xA|j�D]3\}}|||}|dkr)|||<q)q)WxC|j�D]5\}}||krm|dkrmd|||<qmqmW|S(s�
Subtract count, but keep only results with positive counts.
>>> Counter('abbbc') - Counter('bccd')
Counter({'b': 2, 'a': 1})
i(RhR{R�R\(RRmRRyR�R�((s9/usr/lib/python2.7/site-packages/future/backports/misc.pyt__sub__;s cC@s�t|t�stSt�}xU|j�D]G\}}||}||krQ|n|}|dkr)|||<q)q)Wx?|j�D]1\}}||kr�|dkr�|||<q�q�W|S(s�Union
is the maximum of value in either of the input counters.
>>> Counter('abbb') | Counter('bcc')
Counter({'b': 3, 'c': 2, 'a': 1})
i(RhR{R�R\(RRmRRyR�tother_countR�((s9/usr/lib/python2.7/site-packages/future/backports/misc.pyt__or__Ns
cC@sxt|t�stSt�}xU|j�D]G\}}||}||krQ|n|}|dkr)|||<q)q)W|S(s�
Intersection is the minimum of corresponding counts.
>>> Counter('abbb') &
Counter('bcc')
Counter({'b': 1})
i(RhR{R�R\(RRmRRyR�R�R�((s9/usr/lib/python2.7/site-packages/future/backports/misc.pyt__and__bs
cC@s|t�S(sEAdds an empty counter, effectively stripping
negative and zero
counts(R{(R((s9/usr/lib/python2.7/site-packages/future/backports/misc.pyt__pos__sscC@st�|S(s{Subtracts
from an empty counter. Strips positive and zero counts,
and flips the sign on negative counts.
(R{(R((s9/usr/lib/python2.7/site-packages/future/backports/misc.pyt__neg__wscC@sMg|j�D]\}}|dks
|^q
}x|D]
}||=q8W|S(s?Internal
method to strip elements with a negative or zero
counti(R\(RRyR�tnonpositive((s9/usr/lib/python2.7/site-packages/future/backports/misc.pyt_keep_positive~s1
cC@s7x*|j�D]\}}||c|7<q
W|j�S(s�Inplace
add from another counter, keeping only positive counts.
>>> c = Counter('abbb')
>>> c += Counter('bcc')
>>> c
Counter({'b': 4, 'c': 2, 'a': 1})
(R\R�(RRmRyR�((s9/usr/lib/python2.7/site-packages/future/backports/misc.pyt__iadd__�s cC@s7x*|j�D]\}}||c|8<q
W|j�S(s�Inplace
subtract counter, but keep only results with positive counts.
>>> c = Counter('abbbc')
>>> c -= Counter('bccd')
>>> c
Counter({'b': 2, 'a': 1})
(R\R�(RRmRyR�((s9/usr/lib/python2.7/site-packages/future/backports/misc.pyt__isub__�s cC@sJx=|j�D]/\}}||}||kr
|||<q
q
W|j�S(s�Inplace
union is the maximum of value from either counter.
>>> c = Counter('abbb')
>>> c |= Counter('bcc')
>>> c
Counter({'b': 3, 'c': 2, 'a': 1})
(R\R�(RRmRyR�R�((s9/usr/lib/python2.7/site-packages/future/backports/misc.pyt__ior__�s
cC@sJx=|j�D]/\}}||}||kr
|||<q
q
W|j�S(s�Inplace
intersection is the minimum of corresponding counts.
>>> c = Counter('abbb')
>>> c &= Counter('bcc')
>>> c
Counter({'b': 1})
(R\R�(RRmRyR�R�((s9/usr/lib/python2.7/site-packages/future/backports/misc.pyt__iand__�s
N(R$R"R#R;R}R`R�R�RtRgRoR�R_RdRFR]R�R�R�R�R�R�R�R�R�R�R�(((s9/usr/lib/python2.7/site-packages/future/backports/misc.pyR{Ds0+
) #
cO@s�d|krtd��ntjdtj||�}|j�\}}|j�}|r�|jd�}|dkr�|d}ntj||��n|S(s[
For Python 2.6 compatibility: see
http://stackoverflow.com/questions/4814970/
tstdouts3stdout argument not allowed, it will be overridden.R8iN( t
ValueErrort
subprocesstPopentPIPEtcommunicatetpollRvR`tCalledProcessError(t popenargstkwargstprocesstoutputt
unused_errtretcodetcmd((s9/usr/lib/python2.7/site-packages/future/backports/misc.pytcheck_output�s
icc@s
xtr|V||7}qWdS(s�
``itertools.count`` in Py 2.6 doesn't accept a step
parameter. This is an enhanced version of ``itertools.count``
for Py2.6 equivalent to ``itertools.count`` in Python 2.7+.
N(Rn(tstarttstep((s9/usr/lib/python2.7/site-packages/future/backports/misc.pyR��s tChainMapcB@s�eZdZd�Zd�Zd�Zdd�Zd�Zd�Z d�Z
d�ZeZe
�d ��Zed
��Zd�ZeZdd�Zed
��Zd�Zd�Zd�Zd�Zd�ZRS(s�
A ChainMap groups multiple dicts (or other mappings) together
to create a single, updateable view.
The underlying mappings are stored in a list. That list is public and
can
accessed or updated using the *maps* attribute. There is no other
state.
Lookups search the underlying mappings successively until a key is
found.
In contrast, writes, updates, and deletions only operate on the first
mapping.
cG@st|�pig|_dS(s�Initialize a ChainMap by setting *maps*
to the given mappings.
If no mappings are provided, a single empty dictionary is used.
N(R[tmaps(RR�((s9/usr/lib/python2.7/site-packages/future/backports/misc.pyR;�scC@st|��dS(N(RL(RR((s9/usr/lib/python2.7/site-packages/future/backports/misc.pyR}�scC@sAx1|jD]&}y||SWq
tk
r/q
Xq
W|j|�S(N(R�RLR}(RRRw((s9/usr/lib/python2.7/site-packages/future/backports/misc.pyt__getitem__�s
cC@s||kr||S|S(N((RRRX((s9/usr/lib/python2.7/site-packages/future/backports/misc.pyRvscC@stt�j|j��S(N(R1R&tunionR�(R((s9/usr/lib/python2.7/site-packages/future/backports/misc.pyt__len__scC@stt�j|j��S(N(RaR&R�R�(R((s9/usr/lib/python2.7/site-packages/future/backports/misc.pyRHsc@st�fd�|jD��S(Nc3@s|]}�|kVqdS(N((t.0tm(R(s9/usr/lib/python2.7/site-packages/future/backports/misc.pys <genexpr>s(tanyR�(RR((Rs9/usr/lib/python2.7/site-packages/future/backports/misc.pyt__contains__
scC@s
t|j�S(N(R�R�(R((s9/usr/lib/python2.7/site-packages/future/backports/misc.pyt__bool__
scC@s%dj|djtt|j���S(Ns{0.__class__.__name__}({1})s,
(R�R�RktreprR�(R((s9/usr/lib/python2.7/site-packages/future/backports/misc.pyR]scG@s|tj||��S(s?Create
a ChainMap with a single dict created from the
iterable.(RKRg(ReRfR8((s9/usr/lib/python2.7/site-packages/future/backports/misc.pyRgscC@s$|j|jdj�|jd�S(sHNew
ChainMap or subclass with a new copy of maps[0] and refs to
maps[1:]ii(RZR�R_(R((s9/usr/lib/python2.7/site-packages/future/backports/misc.pyR_scC@s(|dkri}n|j||j�S(s�
New ChainMap with a new map followed by all previous maps. If no
map is provided, an empty dict is used.
N(R`RZR�(RR�((s9/usr/lib/python2.7/site-packages/future/backports/misc.pyt new_child#s cC@s|j|jd�S(sNew
ChainMap from
maps[1:].i(RZR�(R((s9/usr/lib/python2.7/site-packages/future/backports/misc.pytparents,scC@s||jd|<dS(Ni(R�(RRR<((s9/usr/lib/python2.7/site-packages/future/backports/misc.pyRA1scC@s?y|jd|=Wn&tk
r:tdj|���nXdS(Nis)Key not found in the first mapping:
{0!r}(R�RLR�(RR((s9/usr/lib/python2.7/site-packages/future/backports/misc.pyRF4s
cC@s9y|jdj�SWntk
r4td��nXdS(sPRemove and return an item pair from maps[0].
Raise KeyError is maps[0] is empty.is#No keys found in the first
mapping.N(R�RMRL(R((s9/usr/lib/python2.7/site-packages/future/backports/misc.pyRM:s
cG@sHy|jdj||�SWn&tk
rCtdj|���nXdS(sWRemove *key* from maps[0] and return its
value. Raise KeyError if *key* not in maps[0].is)Key not found in the first
mapping:
{0!r}N(R�RBRLR�(RRR8((s9/usr/lib/python2.7/site-packages/future/backports/misc.pyRBAs
cC@s|jdj�dS(s'Clear
maps[0], leaving maps[1:]
intact.iN(R�RJ(R((s9/usr/lib/python2.7/site-packages/future/backports/misc.pyRJHsN(R$R"R#R;R}R�R`RvR�RHR�R�t__nonzero__R)R]RtRgR_t__copy__R�tpropertyR�RARFRMRBRJ(((s9/usr/lib/python2.7/site-packages/future/backports/misc.pyR��s* (t_GLOBAL_DEFAULT_TIMEOUTcC@s|\}}d}x�t||dt�D]�}|\}}} }
}d}yYt||| �}|tk rz|j|�n|r�|j|�n|j|�|SWq(tk
r�}
|
}|dk r�|j �q�q(Xq(W|dk r�|�ntd��dS(s�Backport
of 3-argument create_connection() for Py2.6.
Connect to *address* and return the socket object.
Convenience function. Connect to *address* (a 2-tuple ``(host,
port)``) and return the socket object. Passing the optional
*timeout* parameter will set the timeout on the socket instance
before attempting to connect. If no *timeout* is supplied, the
global default timeout setting returned by :func:`getdefaulttimeout`
is used. If *source_address* is set it must be a tuple of (host, port)
for the socket to bind as a source address before making the
connection.
An host of '' or port 0 tells the OS to use the default.
is!getaddrinfo returns an empty listN(
R`RR RR�t
settimeouttbindtconnectR
tclose(taddressttimeouttsource_addressthosttportterrtrestaftsocktypetprotot canonnametsatsockt_((s9/usr/lib/python2.7/site-packages/future/backports/misc.pytcreate_connectionRs(
c@s
dtf�fd��Y}|S(s,Convert a cmp= function into a key=
functiontKc@s}eZdgZd�Z�fd�Z�fd�Z�fd�Z�fd�Z�fd�Z�fd�Z d�Z
RS( tobjcW@s
||_dS(N(R�(RR�R8((s9/usr/lib/python2.7/site-packages/future/backports/misc.pyR;sc@s�|j|j�dkS(Ni(R�(RRm(tmycmp(s9/usr/lib/python2.7/site-packages/future/backports/misc.pyt__lt__�sc@s�|j|j�dkS(Ni(R�(RRm(R�(s9/usr/lib/python2.7/site-packages/future/backports/misc.pyt__gt__�sc@s�|j|j�dkS(Ni(R�(RRm(R�(s9/usr/lib/python2.7/site-packages/future/backports/misc.pyRi�sc@s�|j|j�dkS(Ni(R�(RRm(R�(s9/usr/lib/python2.7/site-packages/future/backports/misc.pyt__le__�sc@s�|j|j�dkS(Ni(R�(RRm(R�(s9/usr/lib/python2.7/site-packages/future/backports/misc.pyt__ge__�sc@s�|j|j�dkS(Ni(R�(RRm(R�(s9/usr/lib/python2.7/site-packages/future/backports/misc.pyRr�scS@std��dS(Nshash
not
implemented(R0(R((s9/usr/lib/python2.7/site-packages/future/backports/misc.pyt__hash__�s(R$R"R.R;R�R�RiR�R�RrR�((R�(s9/usr/lib/python2.7/site-packages/future/backports/misc.pyR�}s (Rs(R�R�((R�s9/usr/lib/python2.7/site-packages/future/backports/misc.pyt
cmp_to_key{sii(R/R{(R�(R�(R�(R�i(Rz(R)(R�(JR#t
__future__RR�tmathRRtoperatorRR�RRlRPtheapqR�t_weakrefRR5t itertoolsRR�RR�RR�RRR R
tfuture.utilsRR
RRRtcollectionsRRtcollections.abcRt_threadRtImportErrort
_dummy_threadtthreadtdummy_threadR)RsR*RKR/RuRzR{R�R�R�R�R`R�R�t_OrderedDictt_Countert
_check_outputt_countt_ceilt__count_elementst_recursive_reprt _ChainMapt_create_connectiont_cmp_to_keytversion_infot functoolstreprlib(((s9/usr/lib/python2.7/site-packages/future/backports/misc.pyt<module>
s�"(
�
�{ l(