
    g                        S SK Jr  S rSq " S S\5      rS r\\l        \\l         \R                    \\l        \\l        \\l        \\l        \\l        \\l        S\l        \R&                  4rg! \
 a    S r\\l	         NQf = f)    )deepcopyc                 H    [        SU R                  R                   S35      e)zC
Function for not implemented method since the object is immutable
'z' object is read-only)AttributeError	__class____name__selfargskwargss      9lib/python3.13/site-packages/frozendict/_frozendict_py.py	immutabler      s)    
 
DNN##$$9:     Nc                      ^  \ rS rSrSrSr\S 5       rS rS r	S r
U 4S jrS	 rS
 rS rS rS rSS jrS rS rSS jrSS jrSS jrS rS rSrU =r$ )
frozendict   z
A simple immutable dictionary.

The API is the same as `dict`, without methods that can change the
immutability. In addition, it supports __hash__().
)_hashc                 :    U " [         R                  " U0 UD65      $ )z
Identical to dict.fromkeys().
)dictfromkeys)clsr   r   s      r   r   frozendict.fromkeys   s     4==$1&122r   c                    U n[        U5      nSn[        U5      S:X  a.  U(       d'  US   nUR                  [        :X  a  U[        :X  a  UnSnU(       a  [        R
                  " U/UQ70 UD6n[        R                  " U/UQ70 UD6  UR                  [        :X  a"  [        U5      (       d  [        c  UqO[        nSnU(       a  [        R                  USS5        W$ )NT   r   Fr   )
boollenr   r   r   __new____init___empty_frozendictobject__setattr__)$e4b37cdf_d78a_4632_bade_6f0579d8efacr   r   r   
has_kwargscontinue_creationitr
   s           r   r   frozendict.__new__%   s    2&\
  t9>*aB ||z)cZ.?$)!<<5d5f5DMM$000 ~~+CII %,(,%,D(-% !""4"5r   c                     g N r	   s      r   r   frozendict.__init__K   s    r   c                     U R                   S:w  a  U R                   nU$ [        U R                  5       5      n[        U5      n[        R                  U SU5        U$ )zO
Calculates the hash if all values are hashable, otherwise
raises a TypeError.
r   r   )r   	frozensetitemshashr!   r"   )r
   r   r   r   fss        r   __hash__frozendict.__hash__N   sR     ::JJE  4::<(BHEtWe4r   c                    > [         TU ]  " U0 UD6nU R                  nU[        :X  a  SUR                   3nOUR                  nU SU S3$ )z
Identical to dict.__repr__().
zfrozendict.())super__repr__r   r   r   )r
   r   r   bodyklassnamer   s         r   r7   frozendict.__repr__^   sW    
 w00J  01D>>Dqa  r   c                 B    U R                   nU[        :X  a  U $ U" U 5      $ )z1
Return the object itself, as it's an immutable.
)r   r   )r
   r9   s     r   copyfrozendict.copym   s$    
 JKT{r   c                 "    U R                  5       $ )z
See copy().
)r=   r	   s      r   __copy__frozendict.__copy__y   s    
 yy{r   c                     U R                   nU[        :H  nU(       a   [        U 5        U(       a  U R	                  5       $ [        [        U 5      5      nU" U5      $ ! [         a    Sn NAf = f)zK
As for tuples, if hashable, see copy(); otherwise, it returns a
deepcopy.
F)r   r   r/   	TypeErrorr=   r   r   )r
   memor   r   r9   return_copytmps          r   __deepcopy__frozendict.__deepcopy__   se     z)$T
 99;tDz"Sz  $#$s   A A+*A+c                 2    U R                   [        U 5      44$ )z
Support for `pickle`.
)r   r   r	   s      r   
__reduce__frozendict.__reduce__   s    
 d..r   c                 T    [        [        U 5      5      nX#U'   U R                  U5      $ r)   r   r   r   )r
   keyvalnew_selfs       r   setfrozendict.set   s&    DJ'~~h''r   c                 b    X;   a  U $ [        [        U 5      5      nX#U'   U R                  U5      $ r)   rM   )r
   rN   defaultrP   s       r   
setdefaultfrozendict.setdefault   s0    ;KDJ'~~h''r   c                 ~    [        [        U 5      5      nX!	 U(       a  U R                  U5      $ U R                  5       $ r)   rM   )r
   rN   rP   s      r   deletefrozendict.delete   s4    DJ'M>>(++~~r   c                      X   $ ! [          a9    [        U5      S-
  nU R                  R                  n[        U SU SU 35      S ef = f)Nr   z index z out of range )
IndexErrorr   r   r   )r
   
collectionindexmaxindexr:   s        r   _get_by_indexfrozendict._get_by_index   s`    	$$ 	:*H>>**D&wnXJ?	s
    AA	c                 V    [        U R                  5       5      nU R                  X!5      $ r)   )tuplekeysr_   r
   r]   r\   s      r   rN   frozendict.key   s#    499;'
!!*44r   c                 V    [        U R                  5       5      nU R                  X!5      $ r)   )rb   valuesr_   rd   s      r   valuefrozendict.value   s#    4;;=)
!!*44r   c                 V    [        U R                  5       5      nU R                  X!5      $ r)   )rb   r.   r_   rd   s      r   itemfrozendict.item   s#    4::<(
!!*44r   c                 H    [        SU R                  R                   S35      e)Nr   z(' object doesn't support item assignmentrC   r   r   )r
   rN   rO   r   r   s        r   __setitem__frozendict.__setitem__   s+    ''( ) 
 	
r   c                 H    [        SU R                  R                   S35      e)Nr   z&' object doesn't support item deletionrn   )r
   rN   r   r   s       r   __delitem__frozendict.__delitem__   s+    ''( ) 
 	
r   r*   r)   )r   )r   
__module____qualname____firstlineno____doc__	__slots__classmethodr   r   r   r1   r7   r=   r@   rG   rJ   rQ   rU   rX   r_   rN   rh   rk   ro   rr   __static_attributes____classcell__)r   s   @r   r   r      s~    I 3 3$L !
,/(( 5
5
5


 
r   r   c                 l    0 nUR                  U 5        UR                  U5        U R                  U5      $ r)   )updater   )r
   otherr   r   ress        r   frozendict_orr      s.    
CJJtJJu>>#r   c                 *    [        [        U 5      5      $ r)   )reversedrb   r	   s      r   frozendict_reversedr      s    d$$r   )r=   r   r   r    r   r   r   __or____ior____reversed__r   r   clearpoppopitemr}   __delattr__r"   rt   r   __all__r*   r   r   <module>r      s      H
 H
V "
 "
 2 
 

 
 "
 "
 $
 
   2% 2J2s   A4 4BB