Ë
    Èúàe¹  ã                   ó^   — d dl Z d dlZddlmZ dddddd	œZ	 	 	 	 	 	 	 dd
„Zd„ Zd„ Zd„ Zd„ Z	y)é    Né   )Ú_make_nez==ú<z<=ú>z>=)ÚeqÚltÚleÚgtÚgec                 ó  ‡— dgt        «       g t        dœŠd}d}| �d}t        d| «      ‰d<   t        «       ‰d<   |�|d	z  }t        d
|«      ‰d<   |�|d	z  }t        d|«      ‰d<   |�|d	z  }t        d|«      ‰d<   |�|d	z  }t        d|«      ‰d<   t	        j
                  |t        fi ˆfd„«      }	|r|	j                  j                  t        «       d|cxk  rdk  r(n |	S |sd}
t        |
«      ‚t        j                  |	«      }	|	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_tor   FTr   Ú__eq__Ú__ne__r   r   Ú__lt__r	   Ú__le__r
   Ú__gt__r   Ú__ge__c                 ó&   •— | j                  ‰«      S ©N)Úupdate)ÚnsÚbodys    €ú+/usr/lib/python3/dist-packages/attr/_cmp.pyú<lambda>zcmp_using.<locals>.<lambda>S   s   ø€ ¨b¯i©i¸«o€ ó    é   zDeq must be define is order to complete ordering from lt, le, gt, ge.)Ú
_make_initr   Ú_make_operatorr   ÚtypesÚ	new_classÚobjectr   ÚappendÚ_check_same_typeÚ
ValueErrorÚ	functoolsÚtotal_ordering)r   r   r	   r
   r   Úrequire_same_typeÚ
class_nameÚnum_order_functionsÚhas_eq_functionÚtype_Úmsgr   s              @r   Ú	cmp_usingr1      sF  ø€ ðL �YÜ“LØÜ.ñ	€Dð ÐØ€Oà	€~ØˆÜ'¨¨bÓ1ˆˆX‰Ü!›ˆˆX‰à	€~Ø˜qÑ ÐÜ'¨¨bÓ1ˆˆX‰à	€~Ø˜qÑ ÐÜ'¨¨bÓ1ˆˆX‰à	€~Ø˜qÑ ÐÜ'¨¨bÓ1ˆˆX‰à	€~Ø˜qÑ ÐÜ'¨¨bÓ1ˆˆX‰ä�O‰OØ”V�I˜rÓ#=ó€Eñ
 Ø×Ñ×"Ñ"Ô#3Ô4ð 	ÐÔ" Ô"ð €Lñ ð YˆCÜ˜S“/Ð!Ü×(Ñ(¨Ó/ˆà€Lr   c                  ó   — d„ } | S )z!
    Create __init__ method.
    c                 ó   — || _         y)z1
        Initialize object with *value*.
        N)r   )Úselfr   s     r   r   z_make_init.<locals>.__init__k   s   € ð ˆ�
r   © )r   s    r   r!   r!   f   s   € ò
ð €Or   c                 óL   ‡— ˆfd„}d| › d�|_         dt        |    › d�|_        |S )z!
    Create operator method.
    c                 óŒ   •— | j                  |«      st        S  ‰| j                  |j                  «      }|t        u rt        S |S r   )r   ÚNotImplementedr   )r4   ÚotherÚresultÚfuncs      €r   Úmethodz_make_operator.<locals>.methody   s>   ø€ Ø×%Ñ% eÔ,Ü!Ð!á�d—j‘j %§+¡+Ó.ˆØ”^Ñ#Ü!Ð!àˆr   Ú__z	Return a z b.  Computed by attrs.)Ú__name__Ú_operation_namesÚ__doc__)Únamer;   r<   s    ` r   r"   r"   t   s;   ø€ ô
ð ˜4˜& �m€F„Oà
Ô$ TÑ*Ð+Ð+BÐCð „Nð €Mr   c                 óD   ‡ ‡— t        ˆˆ fd„‰ j                  D «       «      S )z8
    Check whether `other` is comparable to `self`.
    c              3   ó0   •K  — | ]  } |‰‰«      –— Œ y ­wr   r5   )Ú.0r;   r9   r4   s     €€r   ú	<genexpr>z$_is_comparable_to.<locals>.<genexpr>�   s   øè ø€ Ò@ T‰t�D˜%× Ñ@ùs   ƒ)Úallr   ©r4   r9   s   ``r   r   r   ‹   s   ù€ ô Ô@¨T×-?Ñ-?Ô@Ó@Ð@r   c                 óZ   — |j                   j                  | j                   j                  u S )zR
    Return True if *self* and *other* are of the same type, False otherwise.
    )r   Ú	__class__rG   s     r   r'   r'   ’   s#   € ð �;‰;× Ñ  D§J¡J×$8Ñ$8Ð8Ð8r   )NNNNNTÚ
Comparable)
r)   r#   Ú_maker   r?   r1   r!   r"   r   r'   r5   r   r   ú<module>rL      sV   ðó Û å ð  c°¸SÈÑMÐ ð ØØØØØØóVòròò.Aó9r   