Team Ai
Datasetpublic

codekingpro/portable-devtools

sourceHugging Faceupdated 5mo agoView on Hugging Face
1likes14kdownloads
_cmp.cpython-313.pyc65 linesDownload Raw Back to __pycache__
1�

2��j��`�SSKrSSKrSSKJr SSSSSS	.rSS3jrSrSrS
rSr	g)�N�)�__ne__z==�<z<=�>z>=)�eq�lt�le�gt�gec�0^�S/[5/[S.mSnSnUbSn[SU5TS'[TS'UbUS	-
n[S4U5TS'UbUS	-
n[SU5TS
'UbUS	-
n[SU5TS'UbUS	-
n[SU5TS'[R5"U[40U4Sj5n	U(aU	RR[5 SUs=:aS:a.O U	$U(d
Sn6[U75e[R"U	5n	U	$)a�8Create a class that can be passed into `attrs.field`'s ``eq``, ``order``,9and ``cmp`` arguments to customize field comparison.10 11The resulting class will have a full set of ordering methods if at least12one of ``{lt, le, gt, ge}`` and ``eq``  are provided.13 14Args:15    eq (typing.Callable | None):16        Callable used to evaluate equality of two objects.17 18    lt (typing.Callable | None):19        Callable used to evaluate whether one object is less than another20        object.21 22    le (typing.Callable | None):23        Callable used to evaluate whether one object is less than or equal24        to another object.25 26    gt (typing.Callable | None):27        Callable used to evaluate whether one object is greater than28        another object.29 30    ge (typing.Callable | None):31        Callable used to evaluate whether one object is greater than or32        equal to another object.33 34    require_same_type (bool):35        When `True`, equality and ordering methods will return36        `NotImplemented` if objects are not of the same type.37 38    class_name (str | None): Name of class. Defaults to "Comparable".39 40See `comparison` for more details.41 42.. versionadded:: 21.1.043�value)�	__slots__�__init__�
_requirements�_is_comparable_torFTr�__eq__rrr�__lt__r	�__le__r44�__gt__r�__ge__c�&>�URT5$�N)�update)�ns�bodys ��OD:\code\apps\devtools\python\user_packages\Python313\site-packages\attr/_cmp.py�<lambda>�cmp_using.<locals>.<lambda>]s
���b�i�i��o��zDeq must be define is order to complete ordering from lt, le, gt, ge.)
�45_make_initr�_make_operatorr�types�	new_class�objectr�append�_check_same_type�46ValueError�	functools�total_ordering)rrr	r47r�require_same_type�48class_name�num_order_functions�has_eq_function�type_�msgrs           @r�	cmp_usingr1
sD���`�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�49�
���"�"�#3�4�	��"��"��L��Y�C��S�/�!��(�(��/���Lrc��SnU$)z50Create __init__ method.51c��Xlg)z!52Initialize object with *value*.53N)r
)�selfr
s  rr�_make_init.<locals>.__init__us	���54r�)rs rr!r!ps��55��Orc�N^�U4SjnSUS3UlS[US3UlU$)z56Create operator method.57c�>�URU5(d[$T"URUR5nU[La[$U$r)r�NotImplementedr
)r4�other�result�funcs   �r�method�_make_operator.<locals>.method�sA����%�%�e�,�,�!�!��d�j�j�%�+�+�.���^�#�!�!��
r�__z	Return a z b.  Computed by attrs.)�__name__�_operation_names�__doc__)�namer<r=s ` rr"r"~s;���58��4�&��m�F�O�59�$�T�*�+�+B�C��N��Mrc�F^^�[UU4SjTR55$)z060Check whether `other` is comparable to `self`.61c3�4># �UH
o"TT5v� M g7frr6)�.0r<r:r4s  ��r�	<genexpr>�$_is_comparable_to.<locals>.<genexpr>�s����@�-?�T�t�D�%� � �-?�s�)�allr�r4r:s``rrr�s����@�T�-?�-?�@�@�@rc�Z�URRURRL$)zJ62Return True if *self* and *other* are of the same type, False otherwise.63)r
�	__class__rJs  rr'r'�s#���;�;� � �D�J�J�$8�$8�8�8r)NNNNNT�64Comparable)65r)r#�_makerrAr1r!r"rr'r6rr�<module>rOsV������c��S��M���������`�F��.A�9r
codekingpro/portable-devtools · Team Ai