File: //opt/alt/python311/lib64/python3.11/__pycache__/functools.cpython-311.pyc
�
    !A?h
�  �                   ��  � d Z g d�ZddlmZ ddlmZ ddlmZ ddlm	Z	 ddl
mZ dZd	Z
ee
fd
�Zee
fd�Zd� Zd
� Zd� Zd� Zd� Zd� Zd� Zd� Zd� Zd� Zd� Zd� Zdefdefdefgdefdefdefgdefdefdefgdefdefdefgd�Zd� Zd� Z	 ddlmZ n# e $ r Y nw xY w e!�   �         Z"e"fd �Z#	 dd!lm#Z# n# e $ r Y nw xY w G d"� d#�  �        Z$	 dd$lm$Z$ n# e $ r Y nw xY w G d%� d&e!�  �        Z%d'� Z& ed(g d)��  �        Z' G d*� d+e(�  �        Z) e!�   �         fe*e+he,e-e.fd,�Z/d=d/�Z0d0� Z1	 dd1lm1Z1 n# e $ r Y nw xY wd2� Z2d3� Z3d>d5�Z4d6� Z5d7� Z6d8� Z7 G d9� d:�  �        Z8 e!�   �         Z9 G d;� d<�  �        Z:d4S )?zEfunctools.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                 ��   � |D ]4}	 t          ||�  �        }t          | ||�  �         �%# t          $ r Y �1w xY w|D ]4}t          | |�  �        �                    t          ||i �  �        �  �         �5|| _        | S )a  Update 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�setattr�AttributeError�update�__wrapped__)�wrapper�wrapped�assigned�updated�attr�values         �0/opt/alt/python311/lib64/python3.11/functools.pyr   r   #   s�   � � � *� *��	*��G�T�*�*�E� 
�G�T�5�)�)�)�)�� � 	� 	� 	��D�	���� � B� B�������%�%�g�g�t�R�&@�&@�A�A�A�A� "�G���Ns   �(�
5�5c                 �2   � t          t          | ||��  �        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   r   r*   s      r(   r   r   A   s$   � � �>�7�$�g�7� 7� 7� 7�    c                 �p   � t          | �  �        �                    | |�  �        }|t          u r|S | o| |k    S )zIReturn a > b.  Computed by @total_ordering from (not a < b) and (a != b).��type�__lt__�NotImplemented��self�other�	op_results      r(   �_gt_from_ltr5   Y   �?   � ��T�
�
�!�!�$��.�.�I��N�"�"����=�*�T�U�]�*r+   c                 �n   � t          | �  �        �                    | |�  �        }|t          u r|S |p| |k    S )zEReturn a <= b.  Computed by @total_ordering from (a < b) or (a == b).r-   r1   s      r(   �_le_from_ltr8   `   �=   � ��T�
�
�!�!�$��.�.�I��N�"�"����%���
�%r+   c                 �d   � t          | �  �        �                    | |�  �        }|t          u r|S | S )z=Return a >= b.  Computed by @total_ordering from (not a < b).r-   r1   s      r(   �_ge_from_ltr;   g   �6   � ��T�
�
�!�!�$��.�.�I��N�"�"����=�r+   c                 �p   � t          | �  �        �                    | |�  �        }|t          u r|S | p| |k    S )zJReturn a >= b.  Computed by @total_ordering from (not a <= b) or (a == b).�r.   �__le__r0   r1   s      r(   �_ge_from_ler@   n   �?   � ��T�
�
�!�!�$��.�.�I��N�"�"����=�)�D�E�M�)r+   c                 �n   � t          | �  �        �                    | |�  �        }|t          u r|S |o| |k    S )zFReturn a < b.  Computed by @total_ordering from (a <= b) and (a != b).r>