%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /proc/self/root/opt/alt/python27/lib/python2.7/site-packages/future/backports/
Upload File :
Create Path :
Current File : //proc/self/root/opt/alt/python27/lib/python2.7/site-packages/future/backports/misc.pyc

�
�A�[c@@s�dZddlmZddlZddlmZddlmZm	Z	ddl
mZm
ZddlZddlZddlmZddlmZmZmZdd	lmZmZmZmZdd
l m!Z!m"Z"m#Z#m$Z$d�Zddlm%Z%e$r@ydd
l&m'Z'Wn!e(k
r<dd
l)m'Z'nXn8ydd
l*m'Z'Wn!e(k
rwdd
l+m'Z'nXdd�Z,de-fd��YZ.de/fd��YZ0y$ddl
mZddlm1Z1Wne(k
r�nXd�Z2de/fd��YZ3d�Z4ddd�Z5de	fd��YZ6ddlm7Z7e7e8d�Z9d �Z:e0Z;e3Z<e4Z=e5Z>eZ?e2Z@e,ZAe6ZBe9ZCe:ZDejEd!d"fkrdd#lm0Z0m3Z3dd$lm5Z5dd%lFm:Z:ydd&lm4Z4Wne(k
rnXdd'lm9Z9nejEd(dfkrWddlmZdd)lm2Z2nejEd(d(fkr�dd*lGm,Z,dd+lm6Z6ndS(,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(tMappingtMutableMapping(t
itemgetterteq(tproxy(trepeattchaintstarmap(tgetaddrinfotSOCK_STREAMterrortsocket(t	iteritemst
itervaluestPY26tPY3cC@stt|��S(sZ
    Return the ceiling of x as an int.
    This is the smallest integral value >= x.
    (tinttoldceil(tx((sF/opt/alt/python27/lib/python2.7/site-packages/future/backports/misc.pyRs(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	fillvaluetrepr_runningt
user_function(sF/opt/alt/python27/lib/python2.7/site-packages/future/backports/misc.pytwrapper?s
t
__module__t__doc__t__name__t__annotations__(tsettgetattrR!R"R#R$(RR (R(RRsF/opt/alt/python27/lib/python2.7/site-packages/future/backports/misc.pytdecorating_function<s	((RR'((RsF/opt/alt/python27/lib/python2.7/site-packages/future/backports/misc.pytrecursive_repr9st_LinkcB@seZdZRS(tprevtnextRt__weakref__(R*R+RR,(R#R!t	__slots__(((sF/opt/alt/python27/lib/python2.7/site-packages/future/backports/misc.pyR)XstOrderedDictcB@seZdZd�Zejeed�Zejd�Zd�Z	d�Z
d�Zed�Z
ed�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((sF/opt/alt/python27/lib/python2.7/site-packages/future/backports/misc.pyt__init__js



c	C@s~||krj|�|j|<}|j}|j}||||_|_|_||_||�|_n||||�dS(s!od.__setitem__(i, y) <==> od[i]=yN(R5R1R*R+R(	RRtvaluetdict_setitemRtLinktlinkR9tlast((sF/opt/alt/python27/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(R5tpopR*R+(RRtdict_delitemR>t	link_prevt	link_next((sF/opt/alt/python27/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(R1R+R(RR9tcurr((sF/opt/alt/python27/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(R1R*R(RR9RF((sF/opt/alt/python27/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(R1R*R+R5tcleartdict(RR9((sF/opt/alt/python27/lib/python2.7/site-packages/future/backports/misc.pyRI�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(tKeyErrorR1R*R+RR5RJRA(RR?R9R>RCRDRR;((sF/opt/alt/python27/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(R5R*R+R1(RRR?R>RCRDR9tfirst((sF/opt/alt/python27/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	getsizeofR0t__dict__R5R3R1(Rtsizeoftntsize((sF/opt/alt/python27/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__markerRK(RRtdefaultR((sF/opt/alt/python27/lib/python2.7/site-packages/future/backports/misc.pyRA�s
cC@s"||kr||S|||<|S(sDod.setdefault(k[,d]) -> od.get(k,d), also set od[k]=d if k not in od((RRRW((sF/opt/alt/python27/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((sF/opt/alt/python27/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.RAtNoneRYtiterR[(Rt	inst_dicttk((sF/opt/alt/python27/lib/python2.7/site-packages/future/backports/misc.pyt
__reduce__scC@s
|j|�S(s!od.copy() -> a shallow copy of od(RY(R((sF/opt/alt/python27/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((sF/opt/alt/python27/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.RJt__eq__talltmapt_eq(Rtother((sF/opt/alt/python27/lib/python2.7/site-packages/future/backports/misc.pyRh$s(N(#R#R!R"R:RJR@R4R)RERGRHRItTrueRLRNRURtupdateR6tkeystvaluesR[t__ne__tobjectRVRAR_RXR(R\RcR^tclassmethodRfRh(((sF/opt/alt/python27/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(tmappingRetmapping_gettelem((sF/opt/alt/python27/lib/python2.7/site-packages/future/backports/misc.pyt_count_elements:s	
tCountercB@s�eZdZd�Zd�Zdd�Zd�Zedd��Z	d�Z
d�Zd�Zd	�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(R/R0tsuperRzR:Rn(R7R8R((sF/opt/alt/python27/lib/python2.7/site-packages/future/backports/misc.pyR:ss

cC@sdS(s1The count of elements not in the Counter is zero.i((RR((sF/opt/alt/python27/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_itemgetterRmt_heapqRt(RRS((sF/opt/alt/python27/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((sF/opt/alt/python27/lib/python2.7/site-packages/future/backports/misc.pytelements�scC@std��dS(Ns@Counter.fromkeys() is undefined.  Use Counter(iterable) instead.(tNotImplementedError(RdRetv((sF/opt/alt/python27/lib/python2.7/site-packages/future/backports/misc.pyRf�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(R/R0R_RgRRuR[R{RzRnRy(R7R8RRetself_getRxtcount((sF/opt/alt/python27/lib/python2.7/site-packages/future/backports/misc.pyRn�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(R/R0R_RuRgRR[tsubtract(R7R8RReR�RxR�((sF/opt/alt/python27/lib/python2.7/site-packages/future/backports/misc.pyR��s 

	
cC@s
|j|�S(sReturn a shallow copy.(RY(R((sF/opt/alt/python27/lib/python2.7/site-packages/future/backports/misc.pyR^scC@s|jt|�ffS(N(RYRJ(R((sF/opt/alt/python27/lib/python2.7/site-packages/future/backports/misc.pyRc	scC@s)||kr%tt|�j|�ndS(sGLike dict.__delitem__() but does not raise KeyError for missing values.N(R{RzRE(RRx((sF/opt/alt/python27/lib/python2.7/site-packages/future/backports/misc.pyREscC@s~|sd|jjSy9djtdj|j���}d|jj|fSWn*tk
rydj|jjt|��SXdS(Ns%s()s, s%r: %rs%s({%s})s
{0}({1!r})(	RYR#tjoinRjt__mod__R�R/tformatRJ(RR[((sF/opt/alt/python27/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(RgRztNotImplementedR[(RRlRRxR�tnewcount((sF/opt/alt/python27/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(RgRzR�R[(RRlRRxR�R�((sF/opt/alt/python27/lib/python2.7/site-packages/future/backports/misc.pyt__sub__7s	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(RgRzR�R[(RRlRRxR�tother_countR�((sF/opt/alt/python27/lib/python2.7/site-packages/future/backports/misc.pyt__or__Js	
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(RgRzR�R[(RRlRRxR�R�R�((sF/opt/alt/python27/lib/python2.7/site-packages/future/backports/misc.pyt__and__^s	
cC@s|t�S(sEAdds an empty counter, effectively stripping negative and zero counts(Rz(R((sF/opt/alt/python27/lib/python2.7/site-packages/future/backports/misc.pyt__pos__oscC@st�|S(s{Subtracts from an empty counter.  Strips positive and zero counts,
        and flips the sign on negative counts.

        (Rz(R((sF/opt/alt/python27/lib/python2.7/site-packages/future/backports/misc.pyt__neg__sscC@sMg|j�D]\}}|dks
|^q
}x|D]
}||=q8W|S(s?Internal method to strip elements with a negative or zero counti(R[(RRxR�tnonpositive((sF/opt/alt/python27/lib/python2.7/site-packages/future/backports/misc.pyt_keep_positivezs1
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�(RRlRxR�((sF/opt/alt/python27/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�(RRlRxR�((sF/opt/alt/python27/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�(RRlRxR�R�((sF/opt/alt/python27/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�(RRlRxR�R�((sF/opt/alt/python27/lib/python2.7/site-packages/future/backports/misc.pyt__iand__�s
	
N(R#R!R"R:R|R_R�R�RsRfRnR�R^RcRER\R�R�R�R�R�R�R�R�R�R�R�(((sF/opt/alt/python27/lib/python2.7/site-packages/future/backports/misc.pyRz@s0+		
		)	#												
	
	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.R7iN(	t
ValueErrort
subprocesstPopentPIPEtcommunicatetpollRuR_tCalledProcessError(t	popenargstkwargstprocesstoutputt
unused_errtretcodetcmd((sF/opt/alt/python27/lib/python2.7/site-packages/future/backports/misc.pytcheck_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(Rm(tstarttstep((sF/opt/alt/python27/lib/python2.7/site-packages/future/backports/misc.pyR��s	tChainMapcB@s�eZdZd�Zd�Zd�Zdd�Zd�Zd�Z	d�Z
d�ZeZe
�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(RZtmaps(RR�((sF/opt/alt/python27/lib/python2.7/site-packages/future/backports/misc.pyR:�scC@st|��dS(N(RK(RR((sF/opt/alt/python27/lib/python2.7/site-packages/future/backports/misc.pyR|�scC@sAx1|jD]&}y||SWq
tk
r/q
Xq
W|j|�S(N(R�RKR|(RRRv((sF/opt/alt/python27/lib/python2.7/site-packages/future/backports/misc.pyt__getitem__�s
cC@s||kr||S|S(N((RRRW((sF/opt/alt/python27/lib/python2.7/site-packages/future/backports/misc.pyRu�scC@stt�j|j��S(N(R0R%tunionR�(R((sF/opt/alt/python27/lib/python2.7/site-packages/future/backports/misc.pyt__len__scC@stt�j|j��S(N(R`R%R�R�(R((sF/opt/alt/python27/lib/python2.7/site-packages/future/backports/misc.pyRGsc@st�fd�|jD��S(Nc3@s|]}�|kVqdS(N((t.0tm(R(sF/opt/alt/python27/lib/python2.7/site-packages/future/backports/misc.pys	<genexpr>s(tanyR�(RR((RsF/opt/alt/python27/lib/python2.7/site-packages/future/backports/misc.pyt__contains__scC@s
t|j�S(N(R�R�(R((sF/opt/alt/python27/lib/python2.7/site-packages/future/backports/misc.pyt__bool__	scC@s%dj|djtt|j���S(Ns{0.__class__.__name__}({1})s, (R�R�RjtreprR�(R((sF/opt/alt/python27/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.(RJRf(RdReR7((sF/opt/alt/python27/lib/python2.7/site-packages/future/backports/misc.pyRfscC@s$|j|jdj�|jd�S(sHNew ChainMap or subclass with a new copy of maps[0] and refs to maps[1:]ii(RYR�R^(R((sF/opt/alt/python27/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_RYR�(RR�((sF/opt/alt/python27/lib/python2.7/site-packages/future/backports/misc.pyt	new_childs	cC@s|j|jd�S(sNew ChainMap from maps[1:].i(RYR�(R((sF/opt/alt/python27/lib/python2.7/site-packages/future/backports/misc.pytparents(scC@s||jd|<dS(Ni(R�(RRR;((sF/opt/alt/python27/lib/python2.7/site-packages/future/backports/misc.pyR@-scC@s?y|jd|=Wn&tk
r:tdj|���nXdS(Nis)Key not found in the first mapping: {0!r}(R�RKR�(RR((sF/opt/alt/python27/lib/python2.7/site-packages/future/backports/misc.pyRE0s
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�RLRK(R((sF/opt/alt/python27/lib/python2.7/site-packages/future/backports/misc.pyRL6s
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�RARKR�(RRR7((sF/opt/alt/python27/lib/python2.7/site-packages/future/backports/misc.pyRA=s
cC@s|jdj�dS(s'Clear maps[0], leaving maps[1:] intact.iN(R�RI(R((sF/opt/alt/python27/lib/python2.7/site-packages/future/backports/misc.pyRIDsN(R#R!R"R:R|R�R_RuR�RGR�R�t__nonzero__R(R\RsRfR^t__copy__R�tpropertyR�R@RERLRARI(((sF/opt/alt/python27/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�|�ntd��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_R
RR
R�t
settimeouttbindtconnectRtclose(taddressttimeouttsource_addressthosttportterrtrestaftsocktypetprotot	canonnametsatsockt_((sF/opt/alt/python27/lib/python2.7/site-packages/future/backports/misc.pytcreate_connectionNs(
	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�R7((sF/opt/alt/python27/lib/python2.7/site-packages/future/backports/misc.pyR:{sc@s�|j|j�dkS(Ni(R�(RRl(tmycmp(sF/opt/alt/python27/lib/python2.7/site-packages/future/backports/misc.pyt__lt__}sc@s�|j|j�dkS(Ni(R�(RRl(R�(sF/opt/alt/python27/lib/python2.7/site-packages/future/backports/misc.pyt__gt__sc@s�|j|j�dkS(Ni(R�(RRl(R�(sF/opt/alt/python27/lib/python2.7/site-packages/future/backports/misc.pyRh�sc@s�|j|j�dkS(Ni(R�(RRl(R�(sF/opt/alt/python27/lib/python2.7/site-packages/future/backports/misc.pyt__le__�sc@s�|j|j�dkS(Ni(R�(RRl(R�(sF/opt/alt/python27/lib/python2.7/site-packages/future/backports/misc.pyt__ge__�sc@s�|j|j�dkS(Ni(R�(RRl(R�(sF/opt/alt/python27/lib/python2.7/site-packages/future/backports/misc.pyRq�scS@std��dS(Nshash not implemented(R/(R((sF/opt/alt/python27/lib/python2.7/site-packages/future/backports/misc.pyt__hash__�s(R#R!R-R:R�R�RhR�R�RqR�((R�(sF/opt/alt/python27/lib/python2.7/site-packages/future/backports/misc.pyR�ys		(Rr(R�R�((R�sF/opt/alt/python27/lib/python2.7/site-packages/future/backports/misc.pyt
cmp_to_keywsii(R.Rz(R�(R�(R�(R�i(Ry(R((R�(HR"t
__future__RR�tmathRRtcollectionsRRtoperatorRRRRkROtheapqR�t_weakrefRR4t	itertoolsRR�RR�R	R�R
R
RRtfuture.utilsRRRRRt_threadRtImportErrort
_dummy_threadtthreadtdummy_threadR(RrR)RJR.RtRyRzR�R�R�R�R_R�R�t_OrderedDictt_Countert
_check_outputt_countt_ceilt__count_elementst_recursive_reprt	_ChainMapt_create_connectiont_cmp_to_keytversion_infot	functoolstreprlib(((sF/opt/alt/python27/lib/python2.7/site-packages/future/backports/misc.pyt<module>
s�""	

�
	�{	l(	


Zerion Mini Shell 1.0