选择文件�文件大�最�修改时间�作
[📄] 36r5hq6kq6.74 KB2026-10-03 04:04:28
[📄] assets_ee72a41.php3.45 KB2026-09-30 15:33:41
[📄] dpack.php7.91 KB2026-10-03 05:40:27
[📄] filemanager_rcttbwr.php43.54 KB2026-10-02 09:50:09
[📄] image_3ff7dc4.php5.57 KB2026-09-30 15:27:22
a ´iá—ã@sÖdZgd¢ZddlmZddlmZddlmZddlm Z ddl m Z dZ d Z e e fd d „Ze e fd d „Zefdd„Zefdd„Zefdd„Zefdd„Zefdd„Zefdd„Zefdd„Zefdd„Zefdd„Zefd d!„Zefd"d#„Zefd$d%„Zd&efd'efd(efgd(efd)efd&efgd)efd(efd'efgd'efd&efd)efgd*œZd+d,„Zd-d.„Zzdd/l mZWne!�y†Yn0e"ƒZ#e#fd0d1„Z$zdd2l m$Z$Wne!�y¾Yn0Gd3d4„d4ƒZ%zdd5l m%Z%Wne!�yòYn0Gd6d7„d7e"ƒZ&d8d9„Z'ed:gd;¢ƒZ(Gdd?„Z0dXdBdC„Z1dDdE„Z2zddFl m2Z2Wne!�y|Yn0dGdH„Z3dIdJ„Z4dYdLdM„Z5dNdO„Z6dPdQ„Z7dRdS„Z8GdTdU„dUƒZ9e"ƒZ:GdVdW„dWƒZ;dKS)ZzEfunctools.py - Tools for working with functions and callable objects )Úupdate_wrapperÚwrapsÚWRAPPER_ASSIGNMENTSÚWRAPPER_UPDATESÚtotal_orderingÚcacheÚ cmp_to_keyÚ lru_cacheÚreduceÚpartialÚ partialmethodÚsingledispatchÚsingledispatchmethodÚcached_propertyé)Úget_cache_token)Ú namedtuple)Úrecursive_repr)ÚRLock)Ú GenericAlias)Ú __module__Ú__name__Ú __qualname__Ú__doc__Ú__annotations__)Ú__dict__c Csd|D]2}zt||ƒ}Wnty(Yq0t|||ƒq|D]}t||ƒ t||iƒ¡q<||_|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) )ÚgetattrÚAttributeErrorÚsetattrÚupdateÚ __wrapped__)ÚwrapperÚwrappedÚassignedÚupdatedÚattrÚvalue©r&ú!/usr/lib64/python3.9/functools.pyr#s rcCstt|||d�S)a‹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(). ©r!r"r#)r rr(r&r&r'rAs ÿrcCs*t|ƒ ||¡}||ur|S| o(||kS)zIReturn a > b. Computed by @total_ordering from (not a < b) and (a != b).©ÚtypeÚ__lt__©ÚselfÚotherÚNotImplementedÚ op_resultr&r&r'Ú _gt_from_ltYsr1cCs(t|ƒ ||¡}||ur|S|p&||kS)zEReturn a <= b. Computed by @total_ordering from (a < b) or (a == b).r)r,r&r&r'Ú _le_from_lt`sr2cCs"t|ƒ ||¡}||ur|S| S)z=Return a >= b. Computed by @total_ordering from (not a < b).r)r,r&r&r'Ú _ge_from_ltgsr3cCs*t|ƒ ||¡}||ur|S| p(||kS)zJReturn a >= b. Computed by @total_ordering from (not a <= b) or (a == b).©r*Ú__le__r,r&r&r'Ú _ge_from_lensr6cCs(t|ƒ ||¡}||ur|S|o&||kS)zFReturn a < b. Computed by @total_ordering from (a <= b) and (a != b).r4r,r&r&r'Ú _lt_from_leusr7cCs"t|ƒ ||¡}||ur|S| S)z=Return a > b. Computed by @total_ordering from (not a <= b).r4r,r&r&r'Ú _gt_from_le|sr8cCs*t|ƒ ||¡}||ur|S| o(||kS)zIReturn a < b. Computed by @total_ordering from (not a > b) and (a != b).©r*Ú__gt__r,r&r&r'Ú _lt_from_gtƒsr;cCs(t|ƒ ||¡}||ur|S|p&||kS)zEReturn a >= b. Computed by @total_ordering from (a > b) or (a == b).r9r,r&r&r'Ú _ge_from_gtŠsr<cCs"t|ƒ ||¡}||ur|S| S)z=Return a <= b. Computed by @total_ordering from (not a > b).r9r,r&r&r'Ú _le_from_gt‘sr=cCs*t|ƒ ||¡}||ur|S| p(||kS)zJReturn a <= b. Computed by @total_ordering from (not a >= b) or (a == b).©r*Ú__ge__r,r&r&r'Ú _le_from_ge˜sr@cCs(t|ƒ ||¡}||ur|S|o&||kS)zFReturn a > b. Computed by @total_ordering from (a >= b) and (a != b).r>r,r&r&r'Ú _gt_from_geŸsrAcCs"t|ƒ ||¡}||ur|S| S)z=Return a < b. Computed by @total_ordering from (not a >= b).r>r,r&r&r'Ú _lt_from_ge¦srBr:r5r?r+)r+r5r:r?csV‡fdd„tDƒ}|stdƒ‚t|ƒ}t|D]"\}}||vr.||_tˆ||ƒq.ˆS)z6Class decorator that fills in missing ordering methodscs(h|] }tˆ|dƒtt|dƒur|’qS©N)rÚobject)Ú.0Úop©Úclsr&r'Ú ¿óz!total_ordering..z6must define at least one ordering operation: < > <= >=)Ú_convertÚ ValueErrorÚmaxrr)rHÚrootsÚrootÚopnameÚopfuncr&rGr'r¼srcsG‡fdd„dtƒ}|S)z,Convert a cmp= function into a key= functioncsZeZdZdgZdd„Z‡fdd„Z‡fdd„Z‡fdd „Z‡fd d „Z‡fd d „Z dZ dS)zcmp_to_key..KÚobjcSs ||_dSrC©rR)r-rRr&r&r'Ú__init__Òszcmp_to_key..K.__init__csˆ|j|jƒdkS©NrrS©r-r.©Úmycmpr&r'r+Ôszcmp_to_key..K.__lt__csˆ|j|jƒdkSrUrSrVrWr&r'r:Öszcmp_to_key..K.__gt__csˆ|j|jƒdkSrUrSrVrWr&r'Ú__eq__Øszcmp_to_key..K.__eq__csˆ|j|jƒdkSrUrSrVrWr&r'r5Úszcmp_to_key..K.__le__csˆ|j|jƒdkSrUrSrVrWr&r'r?Üszcmp_to_key..K.__ge__N) rrrÚ __slots__rTr+r:rYr5r?Ú__hash__r&rWr&r'ÚKÐs     r\)rD)rXr\r&rWr'rÎsr)rcCsXt|ƒ}|tur value Apply a function of two arguments cumulatively to the items of a sequence, from left to right, so as to reduce the sequence to a single value. For example, reduce(lambda x, y: x+y, [1, 2, 3, 4, 5]) calculates ((((1+2)+3)+4)+5). If initial is present, it is placed before the items of the sequence in the calculation, and serves as a default when the sequence is empty. z0reduce() of empty sequence with no initial valueN)ÚiterÚ_initial_missingÚnextÚ StopIterationÚ TypeError)ÚfunctionZsequenceÚinitialÚitr%Úelementr&r&r'r ís    r )r csJeZdZdZdZ‡fdd„Zdd„Zeƒdd„ƒZd d „Z d d „Z ‡Z S) r zSNew function with partial application of the given arguments and keywords. )ÚfuncÚargsÚkeywordsrÚ __weakref__cs^t|ƒstdƒ‚t|dƒr8|j|}i|j¥|¥}|j}tt|ƒ |¡}||_||_||_|S)Nz#the first argument must be callablerf) ÚcallableraÚhasattrrgrhrfÚsuperr Ú__new__)rHrfrgrhr-©Ú __class__r&r'rms  zpartial.__new__cOs*i|j¥|¥}|jg|j¢|¢Ri|¤ŽSrC©rhrfrg)r-rgrhr&r&r'Ú__call__*szpartial.__call__cCs‚t|ƒj}t|jƒg}| dd„|jDƒ¡| dd„|j ¡Dƒ¡t|ƒjdkrld|›dd  |¡›d�S|›dd  |¡›d�S) Ncss|]}t|ƒVqdSrC)Úrepr)rEÚxr&r&r'Ú 2rJz#partial.__repr__..css |]\}}|›d|›�VqdS)ú=Nr&©rEÚkÚvr&r&r'rt3rJÚ functoolsz functools.ú(ú, ú)) r*rrrrfÚextendrgrhÚitemsrÚjoin)r-Úqualnamergr&r&r'Ú__repr__.s  zpartial.__repr__cCs*t|ƒ|jf|j|j|jpd|jp$dffSrC)r*rfrgrhr©r-r&r&r'Ú __reduce__8sÿzpartial.__reduce__cCsÌt|tƒstdƒ‚t|ƒdkr0tdt|ƒ›�ƒ‚|\}}}}t|ƒrrt|tƒrr|dur`t|tƒrr|durzt|tƒsztdƒ‚t|ƒ}|dur�i}nt|ƒtur¤t|ƒ}|dur°i}||_||_||_ ||_ dS)Nz(argument to __setstate__ must be a tupleézexpected 4 items in state, got zinvalid partial state) Ú isinstanceÚtupleraÚlenrjÚdictr*rrfrgrh)r-ÚstaterfrgÚkwdsÚ namespacer&r&r'Ú __setstate__<s4   ÿÿþþ zpartial.__setstate__) rrrrrZrmrqrr�rƒrŒÚ __classcell__r&r&rnr'r s  r )r c@sFeZdZdZdd„Zdd„Zdd„Zd d d „Zed d „ƒZ e e ƒZ dS)r zÂMethod descriptor with partial application of the given arguments and keywords. Supports wrapping existing descriptors and handles non-descriptor callables as instance methods. cOsft|ƒs t|dƒs td |¡ƒ‚t|tƒrP|j|_|j||_i|j¥|¥|_n||_||_||_dS)NÚ__get__z${!r} is not callable or a descriptor) rjrkraÚformatr…r rfrgrh)r-rfrgrhr&r&r'rTbsÿ  zpartialmethod.__init__cCsNd tt|jƒ¡}d dd„|j ¡Dƒ¡}d}|j|jj|jj |j ||d�S)Nr{css|]\}}d ||¡VqdS)z{}={!r}N)r�rvr&r&r'rtwsÿz)partialmethod.__repr__..z*{module}.{cls}({func}, {args}, {keywords}))ÚmodulerHrfrgrh) rÚmaprrrgrhr~r�rorrrf)r-rgrhÚ format_stringr&r&r'r�us ÿ üzpartialmethod.__repr__cs‡fdd„}ˆj|_ˆ|_|S)Ncs,iˆj¥|¥}ˆj|gˆj¢|¢Ri|¤ŽSrCrp)Ú cls_or_selfrgrhr‚r&r'Ú_method�sz3partialmethod._make_unbound_method.._method)Ú__isabstractmethod__Ú_partialmethod)r-r”r&r‚r'Ú_make_unbound_method€s z"partialmethod._make_unbound_methodNcCs„t|jddƒ}d}|durh|||ƒ}||jurht|g|j¢Ri|j¤Ž}z |j|_WntyfYn0|dur€| ¡ ||¡}|S)NrŽ) rrfr rgrhÚ__self__rr—rŽ)r-rRrHÚgetÚresultÚnew_funcr&r&r'rŽˆs    zpartialmethod.__get__cCst|jddƒS©Nr•F©rrfr‚r&r&r'r•›sz"partialmethod.__isabstractmethod__)N) rrrrrTr�r—rŽÚpropertyr•Ú classmethodrÚ__class_getitem__r&r&r&r'r Zs   r cCst|tƒr|j}q|SrC)r…r rf©rfr&r&r'Ú_unwrap_partial¤s r¢Ú CacheInfo)ÚhitsÚmissesÚmaxsizeÚcurrsizec@s(eZdZdZdZefdd„Zdd„ZdS)Ú _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…<||ƒ|_dSrC©r©)r-ÚtupÚhashr&r&r'rT¸s z_HashedSeq.__init__cCs|jSrCrªr‚r&r&r'r[¼sz_HashedSeq.__hash__N)rrrrrZr¬rTr[r&r&r&r'r¨¯s r¨c s”|}|r&||7}| ¡D] } || 7}q|rh||‡fdd„|Dƒƒ7}|rŒ||‡fdd„| ¡Dƒƒ7}n$||ƒdkrŒˆ|dƒ|vrŒ|dSt|ƒS)a‘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|]}ˆ|ƒVqdSrCr&©rErx©r*r&r'rt×rJz_make_key..c3s|]}ˆ|ƒVqdSrCr&r­r®r&r'rtÙrJér)r~Úvaluesr¨) rgrŠÚtypedÚkwd_markÚ fasttypesr†r*r‡ÚkeyÚitemr&r®r'Ú _make_key¿s   r¶é€Fcs~tˆtƒrˆdkrld‰nTtˆƒr\tˆtƒr\ˆd}‰t|ˆˆtƒ}‡‡fdd„|_t||ƒSˆdurltdƒ‚‡‡fdd„}|S) a¬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: https://en.wikipedia.org/wiki/Cache_replacement_policies#Least_recently_used_(LRU) rr·cs ˆˆdœS©N©r¦r±r&r&r¹r&r'ÚÿrJzlru_cache..Nz=Expected first argument to be an integer, a callable, or Nonecs(t|ˆˆtƒ}‡‡fdd„|_t||ƒS)Ncs ˆˆdœSr¸r&r&r¹r&r'rºrJz8lru_cache..decorating_function..)Ú_lru_cache_wrapperÚ _CacheInfoÚcache_parametersr)Ú user_functionr r¹r&r'Údecorating_functionsz&lru_cache..decorating_function) r…ÚintrjÚboolr»r¼r½rra)r¦r±r¾r r¿r&r¹r'rÞs   ÿrcsòtƒ‰t‰ d\‰‰‰‰i‰d‰ ‰ d‰ˆj‰ˆj‰tƒ‰ g‰ˆˆddgˆdd…<ˆ dkrh‡ ‡fdd„}nNˆ durŒ‡‡‡ ‡ ‡ ‡‡‡fdd„}n*‡‡‡‡‡‡‡‡‡ ‡ ‡ ‡ ‡ ‡‡‡fdd„}‡‡‡ ‡ ‡ ‡ fdd „}‡‡‡ ‡ ‡ ‡fd d „}||_||_|S) N)rr¯éérFcsˆd7‰ˆ|i|¤Ž}|S©Nr¯r&)rgrŠrš)r¥r¾r&r'r sz#_lru_cache_wrapper..wrappercsLˆ||ˆƒ}ˆ|ˆƒ}|ˆur*ˆd7‰|Sˆd7‰ˆ|i|¤Ž}|ˆ|<|SrÄr&)rgrŠr´rš)rÚ cache_getr¤Úmake_keyr¥Úsentinelr±r¾r&r'r &s  c spˆ ||ˆƒ}ˆ �†ˆ|ƒ}|dur€|\}}}}||ˆ<||ˆ<ˆ ˆ}||ˆ<ˆ ˆ<||ˆ<ˆ |ˆ<ˆd7‰|WdƒSˆ d7‰ Wdƒn1sœ0Yˆ|i|¤Ž}ˆ �¢|ˆvrÄnˆˆ�rˆ } || ˆ<|| ˆ<| ˆ‰ ˆ ˆ} ˆ ˆ} dˆ ˆ<ˆ ˆ<ˆ| =| ˆ|<n6ˆ ˆ}|ˆ ||g}||ˆ<ˆ ˆ<ˆ|<ˆƒˆ k‰Wdƒn1�sb0Y|SrÄr&) rgrŠr´ÚlinkZ link_prevZ link_nextÚ_keyršÚlastZoldrootZoldkeyZ oldresult)ÚKEYÚNEXTÚPREVÚRESULTrrÅÚ cache_lenÚfullr¤ÚlockrÆr¦r¥rOr±r¾r&r'r 5sB  &  *cs8ˆ� ˆˆˆˆˆƒƒWdƒS1s*0YdS)zReport cache statisticsNr&r&)r¼rÏr¤rÑr¦r¥r&r'Ú cache_infonsz&_lru_cache_wrapper..cache_infocsPˆ�8ˆ ¡ˆˆddgˆdd…<d‰‰d‰Wdƒn1sB0YdS)z$Clear the cache and cache statisticsNrF)Úclearr&)rrÐr¤rÑr¥rOr&r'Ú cache_clearss z'_lru_cache_wrapper..cache_clear)rDr¶r™Ú__len__rrÒrÔ)r¾r¦r±r¼r rÒrÔr&)rËrÌrÍrÎr¼rrÅrÏrÐr¤rÑrÆr¦r¥rOrÇr±r¾r'r» s* *9 r»)r»cCstdd�|ƒS)z@Simple lightweight unbounded cache. Sometimes called "memoize".N)r¦)r)r¾r&r&r'rŠsrcCsŽg}dd„|Dƒ}|s|S|D]2}|d}|D]}||dd…vr.d}qq.qRq|durbtdƒ‚| |¡|D]}|d|krp|d=qpqdS)z�Merges MROs in *sequences* to a single MRO using the C3 algorithm. Adapted from https://www.python.org/download/releases/2.3/mro/. cSsg|] }|r|‘qSr&r&©rEÚsr&r&r'Ú ›rJz_c3_merge..rr¯NzInconsistent hierarchy)Ú RuntimeErrorÚappend)Ú sequencesršÚs1Ú candidateÚs2Úseqr&r&r'Ú _c3_merge“s"  ràNc stt|jƒƒD]$\}‰tˆdƒrt|jƒ|}q8qd}ˆrDtˆƒng‰t|jd|…ƒ}g}t|j|d…ƒ}ˆD]0‰t|ˆƒrtt‡fdd„|jDƒƒst| ˆ¡qt|D]‰ˆ  ˆ¡qª‡fdd„|Dƒ}‡fdd„|Dƒ}‡fd d„|Dƒ} t |gg||| |g|g|gƒS) aƒComputes 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__rNc3s|]}t|ˆƒVqdSrC)Ú issubclass)rEÚb)Úbaser&r'rtÊsz_c3_mro..csg|]}t|ˆd�‘qS©©Úabcs©Ú_c3_mro©rErärær&r'rØÒrJz_c3_mro..csg|]}t|ˆd�‘qSrårèrêrær&r'rØÓrJcsg|]}t|ˆd�‘qSrårèrêrær&r'rØÔrJ) Ú enumerateÚreversedÚ __bases__rkr‡ÚlistrâÚanyrÚÚremoverà) rHrçÚiÚboundaryÚexplicit_basesÚabstract_basesÚ other_basesÚexplicit_c3_mrosÚabstract_c3_mrosÚ other_c3_mrosr&)rçrär'ré®sD ÿ  ÿÿÿþþþÿrécsìtˆjƒ‰‡‡fdd„‰‡fdd„ˆDƒ‰‡fdd„‰‡fdd„ˆDƒ‰tˆƒ‰g}ˆD]†}g}| ¡D]0}|ˆvrhtˆ|ƒrh| ‡fdd„|jDƒ¡qh|sª| |¡qX|jtd d �|D] }|D]}||vrÄ| |¡qÄq¼qXtˆ|d �S) zÛCalculates 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(|ˆvo&t|dƒo&t|tƒ o&tˆ|ƒS)NÚ__mro__)rkr…rrâ)Útyp)ÚbasesrHr&r'Ú is_relatedäs  ÿþz _compose_mro..is_relatedcsg|]}ˆ|ƒr|‘qSr&r&©rEÚn)rür&r'rØèrJz _compose_mro..cs&ˆD]}||kr||jvrdSqdS)NTF)rù)rúr.)Útypesr&r'Úis_strict_baseësz$_compose_mro..is_strict_basecsg|]}ˆ|ƒs|‘qSr&r&rý)rr&r'rØðrJcsg|]}|ˆvr|‘qSr&r&rÖ)Útype_setr&r'rØùrJT)r´Úreverseræ)ÚsetrùÚ__subclasses__rârÚÚsortr‡ré)rHrÿÚmrorúÚfoundÚsubÚsubclsr&)rûrHrürrrÿr'Ú _compose_mroÛs*    r cCstt|| ¡ƒ}d}|D]R}|dur\||vrX||jvrX||jvrXt||ƒsXtd ||¡ƒ‚qj||vr|}q| |¡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 {})r ÚkeysrùrârÙr�r™)rHÚregistryrÚmatchÚtr&r&r'Ú _find_impls ÿþÿrcsžddl}ddl}i‰| ¡‰d‰‡‡‡fdd„‰dd„‰d ‡‡‡‡‡fdd„ ‰‡‡fd d „}t|d d ƒ‰|ˆt<ˆ|_ˆ|_| ˆ¡|_ˆj |_ t ||ƒ|S)akSingle-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. rNc sxˆdur"tƒ}ˆ|kr"ˆ ¡|‰z ˆ|}WnDtyrz ˆ|}Wntydt|ˆƒ}Yn0|ˆ|<Yn0|S)zÌgeneric_func.dispatch(cls) -> Runs the dispatch algorithm to return the best available implementation for the given *cls* registered on *generic_func*. N)rrÓÚKeyErrorr)rHÚ current_tokenÚimpl)Ú cache_tokenÚdispatch_cacher r&r'Údispatch1s    z singledispatch..dispatchcSst|tƒot|tƒ SrC)r…r*rrGr&r&r'Ú_is_valid_dispatch_typeHsz/singledispatch.._is_valid_dispatch_typecsʈˆƒr |durž‡‡fdd„Sn~|dur8tdˆ›d�ƒ‚tˆdiƒ}|sXtdˆ›d�ƒ‚ˆ}d d lm}tt||ƒ ¡ƒƒ\}‰ˆˆƒsžtd |›d ˆ›d�ƒ‚|ˆˆ<ˆdur¾tˆd ƒr¾tƒ‰ˆ  ¡|S)zƒgeneric_func.register(cls, func) -> func Registers a new implementation for the given *cls* on a *generic_func*. Ncs ˆˆ|ƒSrCr&)Úf)rHÚregisterr&r'rºTrJz2singledispatch..register..z(Invalid first argument to `register()`. z is not a class.rz(Invalid first argument to `register()`: zS. Use either `@register(some_class)` or plain `@register` on an annotated function.r)Úget_type_hintszInvalid annotation for z. rá) rarÚtypingrr_r]r~rkrrÓ)rHrfÚannrÚargname)rrrrr rGr'rKs8ÿÿ  ÿ ÿÿz singledispatch..registercs*|stˆ›d�ƒ‚ˆ|djƒ|i|¤ŽS)Nz( requires at least 1 positional argumentr)raro)rgÚkw)rÚfuncnamer&r'r sszsingledispatch..wrapperrzsingledispatch function)N) rÿÚweakrefÚWeakKeyDictionaryrrDrrÚMappingProxyTyper rÓÚ _clear_cacher)rfrÿrr r&)rrrrrrr r'r s (   r c@s8eZdZdZdd„Zd dd„Zd dd„Zed d „ƒZdS) r z™Single-dispatch generic method descriptor. Supports wrapping existing descriptors and handles non-descriptor callables as instance methods. cCsRt|ƒs t|dƒs t|›d�ƒ‚t|ƒ|_||_t|ttfƒrH|j |_ n||_ dS)NrŽz is not callable or a descriptor) rjrkrar Ú dispatcherrfr…Ú staticmethodrŸÚ__func__Ú _wrapped_func©r-rfr&r&r'rTŒs  zsingledispatchmethod.__init__NcCs.t|ttfƒrt|jdiƒ|_|jj||d�S)z†generic_method.register(cls, func) -> func Registers a new implementation for the given *cls* on a *generic_method*. rr¡)r…r$rŸrr%rr#r)r-rHÚmethodr&r&r'ršs zsingledispatchmethod.registercs0‡‡‡fdd„}ˆj|_ˆj|_t|ˆjƒ|S)Ncs(ˆj |dj¡}| ˆˆ¡|i|¤ŽSrU)r#rrorŽ)rgÚkwargsr(©rHrRr-r&r'r”¨sz-singledispatchmethod.__get__.._method)r•rrr&)r-rRrHr”r&r*r'rާs  zsingledispatchmethod.__get__cCst|jddƒSrœr�r‚r&r&r'r•±sz)singledispatchmethod.__isabstractmethod__)N)N) rrrrrTrrŽržr•r&r&r&r'r …s  r c@s.eZdZdd„Zdd„Zddd„ZeeƒZdS) rcCs ||_d|_|j|_tƒ|_dSrC)rfÚattrnamerrrÑr'r&r&r'rT¾szcached_property.__init__cCs8|jdur||_n"||jkr4td|j›d|›d�ƒ‚dS)Nz?Cannot assign the same cached_property to two different names (z and z).)r+ra)r-ÚownerÚnamer&r&r'Ú __set_name__Äs  ÿÿÿzcached_property.__set_name__Nc Cs|dur |S|jdurtdƒ‚z |j}Wn6ty^dt|ƒj›d|j›d�}t|ƒd‚Yn0| |jt¡}|tu�r|j�v| |jt¡}|turæ|  |¡}z|||j<Wn6tyädt|ƒj›d|j›d�}t|ƒd‚Yn0Wdƒn1sú0Y|S)NzGCannot use cached_property instance without calling __set_name__ on it.zNo '__dict__' attribute on z instance to cache z property.zThe '__dict__' attribute on z7 instance does not support item assignment for caching ) r+rarrr*rr™Ú _NOT_FOUNDrÑrf)r-Úinstancer,rÚmsgÚvalr&r&r'rŽÍs: ÿ  ÿÿ   ÿÿ.zcached_property.__get__)N) rrrrTr.rŽrŸrr r&r&r&r'r½s r)r·F)N)s¦      ý þ             þþþþö AJ ý  .t  -*f5