e^ddlZddlZddlmZdddddd Z dd Zd Zd Zd ZdZ y)N)_make_nez==z>=)eqltlegtgec dgtgtd d}d}|d}td| d<t d<||d z }td | d <||d z }td | d <||d z }td| d<||d z }td| d<t j |t fi fd} |r| jjtd|cxkrdkr(n| S|s d} t| tj| } | S)a Create a class that can be passed into `attrs.field`'s ``eq``, ``order``, and ``cmp`` arguments to customize field comparison. The resulting class will have a full set of ordering methods if at least one of ``{lt, le, gt, ge}`` and ``eq`` are provided. :param Optional[callable] eq: `callable` used to evaluate equality of two objects. :param Optional[callable] lt: `callable` used to evaluate whether one object is less than another object. :param Optional[callable] le: `callable` used to evaluate whether one object is less than or equal to another object. :param Optional[callable] gt: `callable` used to evaluate whether one object is greater than another object. :param Optional[callable] ge: `callable` used to evaluate whether one object is greater than or equal to another object. :param bool require_same_type: When `True`, equality and ordering methods will return `NotImplemented` if objects are not of the same type. :param Optional[str] class_name: Name of class. Defaults to 'Comparable'. See `comparison` for more details. .. versionadded:: 21.1.0 value) __slots____init__ _requirements_is_comparable_torFTr__eq____ne__rr__lt__r __le__r __gt__r __ge__c&|jSN)update)nsbodys +/usr/lib/python3/dist-packages/attr/_cmp.pyzcmp_using..SsbiiozDeq must be define is order to complete ordering from lt, le, gt, ge.) _make_initr_make_operatorrtypes new_classobjectrappend_check_same_type ValueError functoolstotal_ordering) rrr r r require_same_type class_namenum_order_functionshas_eq_functiontype_msgrs @r cmp_usingr1 sFLYL.  DO ~'b1X!X ~q 'b1X ~q 'b1X ~q 'b1X ~q 'b1X OOVIr#= E  ""#34 "" LYCS/ !((/ Lrc d}|S)z! Create __init__ method. c||_y)z1 Initialize object with *value*. N)r )selfr s rrz_make_init..__init__ks  r)rs rr!r!fs  OrcLfd}d|d|_dt|d|_|S)z! Create operator method. c|j|stS|j|j}|turtS|Sr)rNotImplementedr )r4otherresultfuncs rmethodz_make_operator..methodys>%%e,! !djj%++. ^ #! ! r__z Return a z b. Computed by attrs.)__name___operation_names__doc__)namer;r<s ` rr"r"ts; 4&mFO $T*++BC N MrcDtfdjDS)z8 Check whether `other` is comparable to `self`. c30K|] }|ywrr5).0r;r9r4s r z$_is_comparable_to..s@TtD% @s)allrr4r9s``rrrs @T-?-?@ @@rcZ|jj|jjuS)zR Return True if *self* and *other* are of the same type, False otherwise. )r __class__rGs rr'r's# ;; DJJ$8$8 88r)NNNNNT Comparable) r)r#_makerr?r1r!r"rr'r5rrrLsV cSM     Vr .A9r