
    q`                     <    d Z dZ G d de          ZefZd Zd ZdS )z'Key functions for memoizing decorators.)hashkeytypedkeyc                   X    e Zd ZdZdZej        fdZej        fdZej        fdZd Z	dS )_HashedTuplezA tuple that ensures that hash() will be called no more than once
    per element, since cache decorators will hash the key multiple
    times on a cache miss.  See also _HashedSeq in the standard
    library functools implementation.

    Nc                 <    | j         }| ||           x| _         }|S N)_HashedTuple__hashvalue)selfhash	hashvalues      /lib/python3.11/site-packages/cachetools/keys.py__hash__z_HashedTuple.__hash__   s+    $	+/4::5Dy    c                 4    t           || |                    S r   r   r	   otheradds      r   __add__z_HashedTuple.__add__   s    CCe,,---r   c                 4    t           |||                     S r   r   r   s      r   __radd__z_HashedTuple.__radd__   s    CCt,,---r   c                     i S r    )r	   s    r   __getstate__z_HashedTuple.__getstate__   s    	r   )
__name__
__module____qualname____doc__r   tupler   r   r   r   r   r   r   r   r      s          K!N     "' . . . . #(- . . . .    r   r   c            	          |rDt          | t          t          |                                          t                    z             S t          |           S )z8Return a cache key for the specified hashable arguments.)r   sumsorteditems_kwmark)argskwargss     r   r   r   %   sG      "D3vfllnn'='=w#G#GGHHHD!!!r   c                      t          | i |}|t          d | D                       z  }|t          d t          |                                          D                       z  }|S )z>Return a typed cache key for the specified hashable arguments.c              3   4   K   | ]}t          |          V  d S r   type).0vs     r   	<genexpr>ztypedkey.<locals>.<genexpr>2   s(      ''Qa''''''r   c              3   :   K   | ]\  }}t          |          V  d S r   r(   )r*   _r+   s      r   r,   ztypedkey.<locals>.<genexpr>3   s,      <<TQa<<<<<<r   )r   r   r!   r"   )r$   r%   keys      r   r   r   .   sm     4
"6
"
"C5''$''''''C5<<VFLLNN%;%;<<<<<<CJr   N)r   __all__r   r   r#   r   r   r   r   r   <module>r1      sk    - -
!    5   8 /" " "    r   