HEX

Warning: set_time_limit() [function.set-time-limit]: Cannot set time limit - prohibited by configuration in /home/u547966/brikov.ru/www/wp-content/plugins/admin-menu-editor/menu-editor.php on line 745
Server: Apache
System: Linux 4.19.0-0.bpo.9-amd64 x86_64 at red40
User: u547966 (5490)
PHP: 5.3.29-mh2
Disabled: syslog, dl, popen, proc_open, proc_nice, proc_get_status, proc_close, proc_terminate, posix_mkfifo, chown, chgrp, accelerator_reset, opcache_reset, accelerator_get_status, opcache_get_status, pcntl_alarm, pcntl_fork, pcntl_waitpid, pcntl_wait, pcntl_wifexited, pcntl_wifstopped, pcntl_wifsignaled, pcntl_wifcontinued, pcntl_wexitstatus, pcntl_wtermsig, pcntl_wstopsig, pcntl_signal, pcntl_signal_dispatch, pcntl_get_last_error, pcntl_strerror, pcntl_sigprocmask, pcntl_sigwaitinfo, pcntl_sigtimedwait, pcntl_exec, pcntl_getpriority, pcntl_setpriority
Upload Files
File: //usr/lib/python3.5/__pycache__/functools.cpython-35.pyc


Faq+@sdZddddddddd	d
dgZydd
lmZWnek
rUYnXddlmZddlmZddl	m
Z
ddlmZyddl
mZWn%ek
rGdddZYnXdXZdYZeeddZeeddZeddZedd Zed!d"Zed#d$Zed%d&Zed'd(Zed)d*Zed+d,Zed-d.Zed/d0Zed1d2Zed3d4Zd5d6efd7efd8efgd7d8efd5efd6efgd6d5efd8efd7efgd8d7efd6efd5efgiZ d9dZ!d:dZ"ydd;lm"Z"Wnek
rYnXd<d	Z#ydd=lm#Z#Wnek
rYnXGd>d
d
e$Z%ed?d@dAdBdCgZ&GdDdEdEe'Z(e$fe)e*e+e,dFhe-e.e,e/dGdHZ0dIdJdKdZ1dLdMZ2yddNlm2Z2Wnek
ryYnXdOdPZ3dFdQdRZ4dSdTZ5dUdVZ6dWdZ7dFS)ZzEfunctools.py - Tools for working with functions and callable objects
update_wrapperwrapsWRAPPER_ASSIGNMENTSWRAPPER_UPDATEStotal_ordering
cmp_to_key	lru_cachereducepartial
partialmethodsingledispatch)r)get_cache_token)
namedtuple)MappingProxyType)WeakKeyDictionary)RLockc@s.eZdZdZddZddZdS)rz/Dummy reentrant lock for builds without threadscCsdS)N)selfrr/usr/lib/python3.5/functools.py	__enter__szRLock.__enter__cCsdS)Nr)rexctypeexcinstexctbrrr__exit__szRLock.__exit__N)__name__
__module____qualname____doc__rrrrrrrsrrrrr__annotations____dict__c
CsxF|D]>}yt||}Wntk
r4YqXt|||qWx0|D](}t||jt||iqPW||_|S)aUpdate 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)
    )getattrAttributeErrorsetattrupdate__wrapped__)wrapperwrappedassignedupdatedattrvaluerrrr+s


&	cCsttd|d|d|S)aDecorator 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().
    r&r'r()r	r)r&r'r(rrrrIscCs0|j|}||kr|S|o/||kS)zIReturn a > b.  Computed by @total_ordering from (not a < b) and (a != b).)__lt__)rotherNotImplemented	op_resultrrr_gt_from_ltasr/cCs|j|}|p||kS)zEReturn a <= b.  Computed by @total_ordering from (a < b) or (a == b).)r+)rr,r-r.rrr_le_from_lthsr0cCs$|j|}||kr|S|S)z=Return a >= b.  Computed by @total_ordering from (not a < b).)r+)rr,r-r.rrr_ge_from_ltmsr1cCs0|j|}||kr|S|p/||kS)zJReturn a >= b.  Computed by @total_ordering from (not a <= b) or (a == b).)__le__)rr,r-r.rrr_ge_from_letsr3cCs/|j|}||kr|S|o.||kS)zFReturn a < b.  Computed by @total_ordering from (a <= b) and (a != b).)r2)rr,r-r.rrr_lt_from_le{sr4cCs$|j|}||kr|S|S)z=Return a > b.  Computed by @total_ordering from (not a <= b).)r2)rr,r-r.rrr_gt_from_lesr5cCs0|j|}||kr|S|o/||kS)zIReturn a < b.  Computed by @total_ordering from (not a > b) and (a != b).)__gt__)rr,r-r.rrr_lt_from_gtsr7cCs|j|}|p||kS)zEReturn a >= b.  Computed by @total_ordering from (a > b) or (a == b).)r6)rr,r-r.rrr_ge_from_gtsr8cCs$|j|}||kr|S|S)z=Return a <= b.  Computed by @total_ordering from (not a > b).)r6)rr,r-r.rrr_le_from_gtsr9cCs0|j|}||kr|S|p/||kS)zJReturn a <= b.  Computed by @total_ordering from (not a >= b) or (a == b).)__ge__)rr,r-r.rrr_le_from_gesr;cCs/|j|}||kr|S|o.||kS)zFReturn a > b.  Computed by @total_ordering from (a >= b) and (a != b).)r:)rr,r-r.rrr_gt_from_gesr<cCs$|j|}||kr|S|S)z=Return a < b.  Computed by @total_ordering from (not a >= b).)r:)rr,r-r.rrr_lt_from_gesr=r+r6r2r:cs{fddtD}|s+tdt|}x=t|D]1\}}||krB||_t||qBWS)z6Class decorator that fills in missing ordering methodscs:g|]0}t|dtt|dk	r|qS)N)r object).0op)clsrr
<listcomp>s	z"total_ordering.<locals>.<listcomp>z6must define at least one ordering operation: < > <= >=)_convert
ValueErrormaxrr")rArootsrootopnameopfuncr)rArrs	cs Gfdddt}|S)z,Convert a cmp= function into a key= functioncseZdZdgZddZfddZfddZfdd	Zfd
dZfdd
Z	dZ
dS)zcmp_to_key.<locals>.KobjcSs
||_dS)N)rJ)rrJrrr__init__szcmp_to_key.<locals>.K.__init__cs|j|jdkS)Nr)rJ)rr,)mycmprrr+szcmp_to_key.<locals>.K.__lt__cs|j|jdkS)Nr)rJ)rr,)rLrrr6szcmp_to_key.<locals>.K.__gt__cs|j|jdkS)Nr)rJ)rr,)rLrr__eq__szcmp_to_key.<locals>.K.__eq__cs|j|jdkS)Nr)rJ)rr,)rLrrr2szcmp_to_key.<locals>.K.__le__cs|j|jdkS)Nr)rJ)rr,)rLrrr:szcmp_to_key.<locals>.K.__ge__N)rrr	__slots__rKr+r6rMr2r:__hash__r)rLrrKs	rP)r>)rLrPr)rLrrs)rcstdrJjjj}|j|~jfdd}|_|_|_|S)zSNew function with partial application of the given arguments
    and keywords.
    funccs*j}|j|||S)N)copyr#)ZfargsZ	fkeywordsZnewkeywords)argsrQkeywordsrrnewfuncs
zpartial.<locals>.newfunc)hasattrrSrTrRr#rQ)rQrSrTZtmpkwrUr)rSrQrTrr	s

				)r	c@sXeZdZdZddZddZddZdd	Zed
dZ	dS)
r
zMethod descriptor with partial application of the given arguments
    and keywords.

    Supports wrapping existing descriptors and handles non-descriptor
    callables as instance methods.
    cOst|r2t|dr2tdj|t|tr|j|_|j||_|jj	|_|jj
|n||_||_||_dS)N__get__z${!r} is not callable or a descriptor)callablerV	TypeErrorformat
isinstancer
rQrSrTrRr#)rrQrSrTrrrrKs			zpartialmethod.__init__cCs}djtt|j}djdd|jjD}d}|jd|jjd|jj	d|j
d|d	|S)
Nz, css'|]\}}dj||VqdS)z{}={!r}N)rZ)r?kvrrr	<genexpr>)sz)partialmethod.__repr__.<locals>.<genexpr>z*{module}.{cls}({func}, {args}, {keywords})modulerArQrSrT)joinmapreprrSrTitemsrZ	__class__rrrQ)rrSrT
format_stringrrr__repr__'s	zpartialmethod.__repr__cs+fdd}j|_|_|S)NcsRjj}|j||^}}|fjt|}j||S)N)rTrRr#rStuplerQ)rSrT
call_keywordscls_or_selfrest	call_args)rrr_method3s

z3partialmethod._make_unbound_method.<locals>._method)__isabstractmethod___partialmethod)rrlr)rr_make_unbound_method2s	z"partialmethod._make_unbound_methodcCst|jdd}d}|dk	r|||}||jk	rt||j|j}y|j|_Wntk
rYnX|dkr|jj||}|S)NrW)	r rQr	rSrT__self__r!rorW)rrJrAgetresultnew_funcrrrrW=s
zpartialmethod.__get__cCst|jddS)NrmF)r rQ)rrrrrmPsz"partialmethod.__isabstractmethod__N)
rrrrrKrfrorWpropertyrmrrrrr
s	CacheInfohitsmissesmaxsizecurrsizec@s7eZdZdZdZeddZddZdS)
_HashedSeqz 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.

    	hashvaluecCs#||dd<|||_dS)N)r{)rtuphashrrrrKdsz_HashedSeq.__init__cCs|jS)N)r{)rrrrrOhsz_HashedSeq.__hash__N)rrrrrNr}rKrOrrrrrz[srzNc	s|}	|rC||j}
|	|7}	x|
D]}|	|7}	q/W|r|	|fdd|D7}	|r|	|fdd|
D7}	n0||	dkr|	d|kr|	dSt|	S)aMake 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)Nr)r?r])typerrr^sz_make_key.<locals>.<genexpr>c3s!|]\}}|VqdS)Nr)r?r\r])r~rrr^sr)rcrz)rSkwdstypedkwd_mark	fasttypessortedrgr~lenkeysorted_itemsitemr)r~r	_make_keyks

#&(rFcsAdk	r(ttr(tdfdd}|S)aLeast-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

    Nz)Expected maxsize to be an integer or Nonecs"t|t}t||S)N)_lru_cache_wrapper
_CacheInfor)
user_functionr%)rxrrrdecorating_functionsz&lru_cache.<locals>.decorating_function)r[intrY)rxrrr)rxrrrscsYtt
d\iddjt	g


ddg
dd<dkrfdd}nrdkr
fdd}n<	

fd	d}	fd
d}	
fdd
}||_||_|S)NrrFcs||}d7|S)Nrr)rSrrr)rwrrrr%s
z#_lru_cache_wrapper.<locals>.wrappercsb||}|}|k	r;d7|S||}||<d7|S)Nrr)rSrrrr)cache	cache_getrvmake_keyrwsentinelrrrrr%s


cs	||
}|}|dk	r|\}}}}||<||<}||<<||<|<d7|SWdQRX||}|krnr%}	||	<||	<|	}
}d<<|
=|	|<nH}|||g}||<<|<j
kd7WdQRX|S)Nr)__len__)rSrrlinkZ	link_prevZ	link_nextZ_keyrrZlastZoldrootZoldkeyZ	oldresult)KEYNEXTPREVRESULTrrfullrvlockrrxrwrGrrrrr%sB












cs+jSWdQRXdS)zReport cache statisticsN)rr)rrrvrrxrwrr
cache_info
sz&_lru_cache_wrapper.<locals>.cache_infocsH;jddgdd<ddWdQRXdS)z$Clear the cache and cache statisticsNrF)clearr)rrrvrrwrGrrcache_clears


z'_lru_cache_wrapper.<locals>.cache_clear)rrrr)r>rrqrrr)rrxrrr%rrr)rrrrrrrrrvrrrxrwrGrrrrrs(	
		*<9!!			r)rcCsg}xdd|D}|s&|SxG|D]?}|d}x,|D]#}||ddkrDd}PqDWPq-W|dkrtd|j|x%|D]}|d|kr|d=qWq	WdS)zMerges MROs in *sequences* to a single MRO using the C3 algorithm.

    Adapted from http://www.python.org/download/releases/2.3/mro/.

    cSsg|]}|r|qSrr)r?srrrrB1s	z_c3_merge.<locals>.<listcomp>rrNzInconsistent hierarchy)RuntimeErrorappend)	sequencesrrs1	candidates2seqrrr	_c3_merge)s$




rc
sxLtt|jD]/\}tdrt|j|}PqWd}ratngt|jd|}g}t|j|d}xMD]Et|rtfdd|jDr|jqWx|D]j	qWfdd|D}fdd|D}fd	d|D}	t
|gg|||	|g|g|gS)
aComputes the method resolution order using extended C3 linearization.

    If no *abcs* are given, the algorithm works exactly like the built-in C3
    linearization used for method resolution.

    If given, *abcs* is a list of abstract base classes that should be inserted
    into the resulting MRO. Unrelated ABCs are ignored and don't end up in the
    result. The algorithm inserts ABCs where their functionality is introduced,
    i.e. issubclass(cls, abc) returns True for the class itself but returns
    False for all its direct base classes. Implicit ABCs for a given class
    (either registered or inferred from the presence of a special method like
    __len__) are inserted directly after the last ABC explicitly listed in the
    MRO of said class. If two implicit ABCs end up next to each other in the
    resulting MRO, their ordering depends on the order of types in *abcs*.

    __abstractmethods__rNc3s|]}t|VqdS)N)
issubclass)r?b)baserrr^asz_c3_mro.<locals>.<genexpr>cs"g|]}t|dqS)abcs)_c3_mro)r?r)rrrrBhs	z_c3_mro.<locals>.<listcomp>cs"g|]}t|dqS)r)r)r?r)rrrrBis	cs"g|]}t|dqS)r)r)r?r)rrrrBjs	)	enumeratereversed	__bases__rVrlistranyrremover)
rAriboundaryexplicit_basesabstract_basesother_basesexplicit_c3_mrosabstract_c3_mros
other_c3_mrosr)rrrrDs("
 
rcs]tjfddfddDfddfddDtg}xD]}g}xR|jD]D}|krt|r|jfdd|jDqW|s|j|q|jd	td
dx8|D]0}x'|D]}||kr"|j|q"WqWqWtd|S)
zCalculates the method resolution order for a given class *cls*.

    Includes relevant abstract base classes (with their respective bases) from
    the *types* iterable. Uses a modified C3 linearization algorithm.

    cs(|ko't|do't|S)N__mro__)rVr)typ)basesrArr
is_relatedzsz _compose_mro.<locals>.is_relatedcs"g|]}|r|qSrr)r?n)rrrrB}s	z _compose_mro.<locals>.<listcomp>cs4x-D]%}||kr||jkrdSqWdS)NTF)r)rr,)typesrris_strict_bases
z$_compose_mro.<locals>.is_strict_basecs"g|]}|s|qSrr)r?r)rrrrBs	cs"g|]}|kr|qSrr)r?r)type_setrrrBs	rreverseTr)setr__subclasses__rrsortrr)rArmrorfoundsubsubclsr)rrArrrrr_compose_mroqs*
'


rcCst||j}d}x|D]w}|dk	r||kr||jkr||jkrt||rtdj||P||kr"|}q"W|j|S)a^Returns the best matching implementation from *registry* for type *cls*.

    Where there is no registered implementation for a specific type, its method
    resolution order is used to find a more generic implementation.

    Note: if *registry* does not contain an implementation for the base
    *object* type, this function may return None.

    NzAmbiguous dispatch: {} or {})rkeysrrrrZrq)rAregistryrmatchtrrr
_find_impls

	
rcsitdfdddfddfdd}|t<|_|_t|_j|_t|||S)alSingle-dispatch generic function decorator.

    Transforms a function into a generic function, which can have different
    behaviours depending upon the type of its first argument. The decorated
    function acts as the default implementation, and additional
    implementations can be registered using the register() attribute of the
    generic function.

    Ncsdk	r1t}|kr1j|y|}WnNtk
ry|}Wn!tk
rt|}YnX||<YnX|S)zgeneric_func.dispatch(cls) -> <function implementation>

        Runs the dispatch algorithm to return the best available implementation
        for the given *cls* registered on *generic_func*.

        N)r
rKeyErrorr)rA
current_tokenimpl)cache_tokendispatch_cacherrrdispatchs	


z singledispatch.<locals>.dispatchcs[|dkrfddS|<dkrMtdrMtj|S)zgeneric_func.register(cls, func) -> func

        Registers a new implementation for the given *cls* on a *generic_func*.

        Ncs
|S)Nr)f)rAregisterrr<lambda>sz2singledispatch.<locals>.register.<locals>.<lambda>r)rVr
r)rArQ)rrrr)rArrs
	
z singledispatch.<locals>.registercs|dj||S)Nr)rd)rSkw)rrrr%szsingledispatch.<locals>.wrapper)	rr>rrrrr_clear_cacher)rQr%r)rrrrrrrs
	
		
)rrrrr)r)8r__all__
_functoolsrImportErrorabcr
collectionsrrrweakrefr_threadrrrrrr-r/r0r1r3r4r5r7r8r9r;r<r=rCrrr	r>r
rrrzrstr	frozensetr~rrgrrrrrrrrrrrrr<module>s



				

N	%s
-)