AlkantarClanX12

Your IP : 3.135.220.219


Current Path : /proc/thread-self/root/opt/alt/python33/lib64/python3.3/__pycache__/
Upload File :
Current File : //proc/thread-self/root/opt/alt/python33/lib64/python3.3/__pycache__/functools.cpython-33.pyo

�
��f5c@smdZddddddddd	g	Zd
dlmZmZd
dlmZyd
d
lmZWnGdd�d�ZYnXd'Z	d(Z
e	e
dd�Ze	e
dd�Zdd�Z
dd�Zyd
dlmZWnek
r�YnXedddddg�ZGd d!�d!e�Ze�feeeed&�heeeed"d#�Zd$d)d%d�Zd&S(*uEfunctools.py - Tools for working with functions and callable objects
uupdate_wrapperuwrapsuWRAPPER_ASSIGNMENTSuWRAPPER_UPDATESutotal_orderingu
cmp_to_keyu	lru_cacheureduceupartiali(upartialureduce(u
namedtuple(uRLockcBs2|EeZdZdZdd�Zdd�ZdS(uRLocku/Dummy reentrant lock for builds without threadscCsdS(N((uself((u./opt/alt/python33/lib64/python3.3/functools.pyu	__enter__suRLock.__enter__cCsdS(N((uselfuexctypeuexcinstuexctb((u./opt/alt/python33/lib64/python3.3/functools.pyu__exit__suRLock.__exit__N(u__name__u
__module__u__qualname__u__doc__u	__enter__u__exit__(u
__locals__((u./opt/alt/python33/lib64/python3.3/functools.pyuRLocksuRLocku
__module__u__name__u__qualname__u__doc__u__annotations__u__dict__c
Cs�||_xF|D]>}yt||�}Wntk
r=YqXt|||�qWx0|D](}t||�jt||i��qYW|S(uUpdate a wrapper function to look like the wrapped function

       wrapper is the function to be updated
       wrapped is the original function
       assigned is a tuple naming the attributes assigned directly
       from the wrapped function to the wrapper function (defaults to
       functools.WRAPPER_ASSIGNMENTS)
       updated is a tuple naming the attributes of the wrapper that
       are updated with the corresponding attribute from the wrapped
       function (defaults to functools.WRAPPER_UPDATES)
    (u__wrapped__ugetattruAttributeErrorusetattruupdate(uwrapperuwrappeduassigneduupdateduattruvalue((u./opt/alt/python33/lib64/python3.3/functools.pyuupdate_wrapper#s	


&cCsttd|d|d|�S(u�Decorator factory to apply update_wrapper() to a wrapper function

       Returns a decorator that invokes update_wrapper() with the decorated
       function as the wrapper argument and the arguments to wraps() as the
       remaining arguments. Default arguments are as for update_wrapper().
       This is a convenience function to simplify applying partial() to
       update_wrapper().
    uwrappeduassigneduupdated(upartialuupdate_wrapper(uwrappeduassigneduupdated((u./opt/alt/python33/lib64/python3.3/functools.pyuwraps?scsliddd�fddd�fddd�fgd6dd	d�fdd
d�fddd�fgd6ddd�fdd
d�fddd�fgd6ddd�fddd�fddd�fgd6}�fdd�|D�}|std��nt|�}xU||D]I\}}||kr||_tt|�j|_t�||�qqW�S(u6Class decorator that fills in missing ordering methodsu__gt__cSs||kp||kS(N((uselfuother((u./opt/alt/python33/lib64/python3.3/functools.pyu<lambda>Usu total_ordering.<locals>.<lambda>u__le__cSs||kp||kS(N((uselfuother((u./opt/alt/python33/lib64/python3.3/functools.pyu<lambda>Vsu__ge__cSs||kS(N((uselfuother((u./opt/alt/python33/lib64/python3.3/functools.pyu<lambda>Wsu__lt__cSs||kp||kS(N((uselfuother((u./opt/alt/python33/lib64/python3.3/functools.pyu<lambda>XscSs||ko||kS(N((uselfuother((u./opt/alt/python33/lib64/python3.3/functools.pyu<lambda>YscSs||kS(N((uselfuother((u./opt/alt/python33/lib64/python3.3/functools.pyu<lambda>ZscSs||kp||kS(N((uselfuother((u./opt/alt/python33/lib64/python3.3/functools.pyu<lambda>[scSs||kp||kS(N((uselfuother((u./opt/alt/python33/lib64/python3.3/functools.pyu<lambda>\scSs||kS(N((uselfuother((u./opt/alt/python33/lib64/python3.3/functools.pyu<lambda>]scSs||kp||kS(N((uselfuother((u./opt/alt/python33/lib64/python3.3/functools.pyu<lambda>^scSs||ko||kS(N((uselfuother((u./opt/alt/python33/lib64/python3.3/functools.pyu<lambda>_scSs||kS(N((uselfuother((u./opt/alt/python33/lib64/python3.3/functools.pyu<lambda>`scs:g|]0}t�|d�tt|d�k	r|�qS(N(ugetattruNoneuobject(u.0uop(ucls(u./opt/alt/python33/lib64/python3.3/functools.pyu
<listcomp>cs	u"total_ordering.<locals>.<listcomp>u6must define at least one ordering operation: < > <= >=(u
ValueErrorumaxu__name__ugetattruintu__doc__usetattr(uclsuconverturootsurootuopnameuopfunc((uclsu./opt/alt/python33/lib64/python3.3/functools.pyutotal_orderingRs.	cs G�fdd�dt�}|S(u,Convert a cmp= function into a key= functioncs�|EeZdZdgZdd�Z�fdd�Z�fdd�Z�fdd	�Z�fd
d�Z�fdd
�Z	�fdd�Z
dZdS(ucmp_to_key.<locals>.KuobjcSs
||_dS(N(uobj(uselfuobj((u./opt/alt/python33/lib64/python3.3/functools.pyu__init__wsucmp_to_key.<locals>.K.__init__cs�|j|j�dkS(Ni(uobj(uselfuother(umycmp(u./opt/alt/python33/lib64/python3.3/functools.pyu__lt__ysucmp_to_key.<locals>.K.__lt__cs�|j|j�dkS(Ni(uobj(uselfuother(umycmp(u./opt/alt/python33/lib64/python3.3/functools.pyu__gt__{sucmp_to_key.<locals>.K.__gt__cs�|j|j�dkS(Ni(uobj(uselfuother(umycmp(u./opt/alt/python33/lib64/python3.3/functools.pyu__eq__}sucmp_to_key.<locals>.K.__eq__cs�|j|j�dkS(Ni(uobj(uselfuother(umycmp(u./opt/alt/python33/lib64/python3.3/functools.pyu__le__sucmp_to_key.<locals>.K.__le__cs�|j|j�dkS(Ni(uobj(uselfuother(umycmp(u./opt/alt/python33/lib64/python3.3/functools.pyu__ge__�sucmp_to_key.<locals>.K.__ge__cs�|j|j�dkS(Ni(uobj(uselfuother(umycmp(u./opt/alt/python33/lib64/python3.3/functools.pyu__ne__�sucmp_to_key.<locals>.K.__ne__N(
u__name__u
__module__u__qualname__u	__slots__u__init__u__lt__u__gt__u__eq__u__le__u__ge__u__ne__uNoneu__hash__(u
__locals__(umycmp(u./opt/alt/python33/lib64/python3.3/functools.pyuKus	uK(uobject(umycmpuK((umycmpu./opt/alt/python33/lib64/python3.3/functools.pyu
cmp_to_keyss(u
cmp_to_keyu	CacheInfouhitsumissesumaxsizeucurrsizecBs;|EeZdZdZdZedd�Zdd�ZdS(u
_HashedSequ� This class guarantees that hash() will be called no more than once
        per element.  This is important because the lru_cache() will hash
        the key multiple times on a cache miss.

    u	hashvaluecCs#||dd�<||�|_dS(N(u	hashvalue(uselfutupuhash((u./opt/alt/python33/lib64/python3.3/functools.pyu__init__�su_HashedSeq.__init__cCs|jS(N(u	hashvalue(uself((u./opt/alt/python33/lib64/python3.3/functools.pyu__hash__�su_HashedSeq.__hash__N(u__name__u
__module__u__qualname__u__doc__u	__slots__uhashu__init__u__hash__(u
__locals__((u./opt/alt/python33/lib64/python3.3/functools.pyu
_HashedSeq�su
_HashedSeqc	s�|}	|rF||j��}
|	|7}	x|
D]}|	|7}	q/Wn|r�|	|�fdd�|D��7}	|r�|	|�fdd�|
D��7}	q�n0||	�dkr��|	d�|kr�|	dSt|	�S(u�Make a cache key from optionally typed positional and keyword arguments

    The key is constructed in a way that is flat as possible rather than
    as a nested structure that would take more memory.

    If there is only a single argument and its data type is known to cache
    its hash value, then that argument is returned without a wrapper.  This
    saves space and improves lookup speed.

    c3s|]}�|�VqdS(N((u.0uv(utype(u./opt/alt/python33/lib64/python3.3/functools.pyu	<genexpr>�su_make_key.<locals>.<genexpr>c3s!|]\}}�|�VqdS(N((u.0ukuv(utype(u./opt/alt/python33/lib64/python3.3/functools.pyu	<genexpr>�sii(uitemsu
_HashedSeq(uargsukwdsutypedukwd_marku	fasttypesusortedutupleutypeulenukeyusorted_itemsuitem((utypeu./opt/alt/python33/lib64/python3.3/functools.pyu	_make_key�s

#)(u	_make_keyi�csLt��t�d\������������fdd�}|S(u�Least-recently-used cache decorator.

    If *maxsize* is set to None, the LRU features are disabled and the cache
    can grow without bound.

    If *typed* is True, arguments of different types will be cached separately.
    For example, f(3.0) and f(3) will be treated as distinct calls with
    distinct results.

    Arguments to the cached function must be hashable.

    View the cache statistics named tuple (hits, misses, maxsize, currsize)
    with f.cache_info().  Clear the cache and statistics with f.cache_clear().
    Access the underlying function with f.__wrapped__.

    See:  http://en.wikipedia.org/wiki/Cache_algorithms#Least_Recently_Used

    iiiics>i�d��d
��j�t��g���ddg�dd�<�
dkrn��fdd�}nr�
dkr���������fdd�}n<��	�
��������
����fdd�}����
�fdd�}������fdd	�}||_||_t|��S(Nics�||�}�d7�|S(Ni((uargsukwdsuresult(umissesu
user_function(u./opt/alt/python33/lib64/python3.3/functools.pyuwrapper�s
u7lru_cache.<locals>.decorating_function.<locals>.wrappercsb�||��}�|��}|�k	r;�d7�|S�||�}|�|<�d7�|S(Ni((uargsukwdsukeyuresult(ucacheu	cache_getuhitsumake_keyumissesusentinelutypedu
user_function(u./opt/alt/python33/lib64/python3.3/functools.pyuwrapper�s


cs��	||�
�}����|�}|dk	r�|\}}}}||�<||�<��}||�<��<||�<�|�<�d7�|SWdQX�||�}���|�kr�n��r$�}	||	�<||	�<|	����}
��}d��<��<�|
=|	�|<nH��}|�||g}||�<��<�|<t���
k��d7�WdQX|S(Ni(uNoneulen(uargsukwdsukeyulinku	link_prevu	link_nextu_keyuresultulastuoldrootuoldkeyu	oldresult(uKEYuNEXTuPREVuRESULTucacheu	cache_getufulluhitsulockumake_keyumaxsizeumissesurootutypedu
user_function(u./opt/alt/python33/lib64/python3.3/functools.pyuwrappersB













c
s*��t���t���SWdQXdS(uReport cache statisticsN(u
_CacheInfoulen((ucacheuhitsulockumaxsizeumisses(u./opt/alt/python33/lib64/python3.3/functools.pyu
cache_info9su:lru_cache.<locals>.decorating_function.<locals>.cache_infocsG��;�j���ddg�dd�<d��d�WdQXdS(u$Clear the cache and cache statisticsNiF(uclearuNoneuFalse((ucacheufulluhitsulockumissesuroot(u./opt/alt/python33/lib64/python3.3/functools.pyucache_clear>s


u;lru_cache.<locals>.decorating_function.<locals>.cache_clearF(uFalseugetuRLockuNoneu
cache_infoucache_clearuupdate_wrapper(u
user_functionuwrapperu
cache_infoucache_clear(uKEYuNEXTuPREVuRESULTumake_keyumaxsizeusentinelutyped(ucacheu	cache_getufulluhitsulockumissesurootu
user_functionu./opt/alt/python33/lib64/python3.3/functools.pyudecorating_function�s"
		*<7!			u&lru_cache.<locals>.decorating_function(iiii(uobjectu	_make_key(umaxsizeutypedudecorating_function((uKEYuNEXTuPREVuRESULTumake_keyumaxsizeusentinelutypedu./opt/alt/python33/lib64/python3.3/functools.pyu	lru_cache�s
	'mN(u
__module__u__name__u__qualname__u__doc__u__annotations__(u__dict__F(u__doc__u__all__u
_functoolsupartialureduceucollectionsu
namedtupleu_threaduRLockuWRAPPER_ASSIGNMENTSuWRAPPER_UPDATESuupdate_wrapperuwrapsutotal_orderingu
cmp_to_keyuImportErroru
_CacheInfoulistu
_HashedSequobjectuintustru	frozensetutypeuNoneusortedutupleulenu	_make_keyuFalseu	lru_cache(((u./opt/alt/python33/lib64/python3.3/functools.pyu<module>s6	
!