usr/lib64/python2.7/functools.pyo000064400000014745147204441150012627 0ustar00 zfc@s\dZddlmZmZd Zd ZeedZeedZd Zd Z d S(sEfunctools.py - Tools for working with functions and callable objects i(tpartialtreducet __module__t__name__t__doc__t__dict__cCsax'|D]}t||t||qWx0|D](}t||jt||iq1W|S(sUpdate 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) (tsetattrtgetattrtupdate(twrappertwrappedtassignedtupdatedtattr((s!/usr/lib64/python2.7/functools.pytupdate_wrappers   &cCsttd|d|d|S(sDecorator 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 (RR(R R R ((s!/usr/lib64/python2.7/functools.pytwraps's cCsiddfddfddfddfgd 6dd fd d fdd fdd fgd6d dfddfddfddfgd6ddfddfddfd dfgd6}tt|}|t|@}|stdnt|}xU||D]I\}}||kr0||_tt|j|_t|||q0q0W|S(s6Class decorator that fills in missing ordering methodst__gt__cSs||kp||k S(N((tselftother((s!/usr/lib64/python2.7/functools.pyt8tt__le__cSs||kp||kS(N((RR((s!/usr/lib64/python2.7/functools.pyR9Rt__ne__cSs ||k S(N((RR((s!/usr/lib64/python2.7/functools.pyR:Rt__ge__cSs ||k S(N((RR((s!/usr/lib64/python2.7/functools.pyR;Rt__lt__cSs||k p||kS(N((RR((s!/usr/lib64/python2.7/functools.pyR<RcSs||ko||k S(N((RR((s!/usr/lib64/python2.7/functools.pyR=RcSs ||k S(N((RR((s!/usr/lib64/python2.7/functools.pyR>RcSs ||k S(N((RR((s!/usr/lib64/python2.7/functools.pyR?RcSs||kp||k S(N((RR((s!/usr/lib64/python2.7/functools.pyR@RcSs||kp||kS(N((RR((s!/usr/lib64/python2.7/functools.pyRARcSs ||k S(N((RR((s!/usr/lib64/python2.7/functools.pyRBRcSs ||k S(N((RR((s!/usr/lib64/python2.7/functools.pyRCRcSs||k p||kS(N((RR((s!/usr/lib64/python2.7/functools.pyRDRcSs||ko||k S(N((RR((s!/usr/lib64/python2.7/functools.pyRERcSs ||k S(N((RR((s!/usr/lib64/python2.7/functools.pyRFRcSs ||k S(N((RR((s!/usr/lib64/python2.7/functools.pyRGRs6must define at least one ordering operation: < > <= >=( tsettdirt ValueErrortmaxRRtintRR(tclstconverttdefined_methodstrootstroottopnametopfunc((s!/usr/lib64/python2.7/functools.pyttotal_ordering5s8               cs dtffdY}|S(s,Convert a cmp= function into a key= functiontKcs}eZdgZdZfdZfdZfdZfdZfdZfdZ dZ RS( tobjcWs ||_dS(N(R'(RR'targs((s!/usr/lib64/python2.7/functools.pyt__init__Yscs|j|jdkS(Ni(R'(RR(tmycmp(s!/usr/lib64/python2.7/functools.pyR[scs|j|jdkS(Ni(R'(RR(R*(s!/usr/lib64/python2.7/functools.pyR]scs|j|jdkS(Ni(R'(RR(R*(s!/usr/lib64/python2.7/functools.pyt__eq___scs|j|jdkS(Ni(R'(RR(R*(s!/usr/lib64/python2.7/functools.pyRascs|j|jdkS(Ni(R'(RR(R*(s!/usr/lib64/python2.7/functools.pyRcscs|j|jdkS(Ni(R'(RR(R*(s!/usr/lib64/python2.7/functools.pyRescSstddS(Nshash not implemented(t TypeError(R((s!/usr/lib64/python2.7/functools.pyt__hash__gs( RRt __slots__R)RRR+RRRR-((R*(s!/usr/lib64/python2.7/functools.pyR&Ws  (tobject(R*R&((R*s!/usr/lib64/python2.7/functools.pyt cmp_to_keyUsN(RRR(R( Rt _functoolsRRtWRAPPER_ASSIGNMENTStWRAPPER_UPDATESRRR%R0(((s!/usr/lib64/python2.7/functools.pyts