
    `Vgu                    T    d Z ddlmZ ddlmZmZ ddlmZ ddlm	Z	  G d dee
      Zy)	zj
frozen (immutable) data structures to support MultiIndexing

These are used for:

- .names (FrozenList)

    )annotations)AnyNoReturn)PandasObjectpprint_thingc                       e Zd ZdZd fdZddZexZZ fdZd Z	d fdZ
e
Z fdZeZd Zdd	Zdd
ZddZddZexZZexZZexZxZZexZxZZ xZS )
FrozenListz
    Container that doesn't allow setting item *but*
    because it's technically hashable, will be used
    for lookups, appropriately, etc.
    c                v    t        |t              rt        |      } t        |       t        |   |            S )aF  
        Returns a FrozenList with other concatenated to the end of self.

        Parameters
        ----------
        other : array-like
            The array-like whose elements we are concatenating.

        Returns
        -------
        FrozenList
            The collection difference between self and other.
        )
isinstancetuplelisttypesuper__add__selfother	__class__s     [/var/www/html/hubwallet-dev/venv/lib/python3.12/site-packages/pandas/core/indexes/frozen.pyunionzFrozenList.union   s2     eU#KEtDz%'/%011    c                l    t        |      }| D cg c]	  }||vs| }} t        |       |      S c c}w )aF  
        Returns a FrozenList with elements from other removed from self.

        Parameters
        ----------
        other : array-like
            The array-like whose elements we are removing self.

        Returns
        -------
        FrozenList
            The collection difference between self and other.
        )setr   )r   r   xtemps       r   
differencezFrozenList.difference1   s<     E
2a1E>22tDz$ 3s   	11c                ~    t        |t              r t        |       t        |   |            S t        |   |      S N)r   slicer   r   __getitem__)r   nr   s     r   r!   zFrozenList.__getitem__F   s8    a4:eg1!455w"1%%r   c                r    t        |t              rt        |      } t        |       |t        |       z         S r   )r   r   r   r   )r   r   s     r   __radd__zFrozenList.__radd__K   s/    eU#KEtDz%$t*,--r   c                d    t        |t        t        f      rt        |      }t        |   |      S r   )r   r   r
   r   r   __eq__r   s     r   r&   zFrozenList.__eq__P   s*    eeZ01KEw~e$$r   c                @     t        |       t        | 	  |            S r   )r   r   __mul__r   s     r   r(   zFrozenList.__mul__W   s    tDz%'/%011r   c                0    t        |       t        |       ffS r   )r   r   r   s    r   
__reduce__zFrozenList.__reduce__\   s    DzDJ=((r   c                *    t        t        |             S r   )hashr   r*   s    r   __hash__zFrozenList.__hash__`   s    E$K  r   c                F    t        dt        |       j                   d      )zL
        This method will not function because object is immutable.
        'z&' does not support mutable operations.)	TypeErrorr   __name__)r   argskwargss      r   	_disabledzFrozenList._disabledc   s$     !DJ//00VWXXr   c                    t        | dd      S )NT)	
)quote_stringsescape_charsr   r*   s    r   __str__zFrozenList.__str__i   s    DCUVVr   c                J    t        |       j                   dt        |        dS )N())r   r2   strr*   s    r   __repr__zFrozenList.__repr__l   s$    t*%%&aD	{!44r   )returnr
   )r   r   rB   bool)rB   int)rB   r   )rB   r@   )r2   
__module____qualname____doc__r   r   r   __iadd__r!   r$   r&   __req__r(   __imul__r+   r.   r5   r<   rA   __setitem____setslice____delitem____delslice__popappendextendremovesortinsert__classcell__)r   s   @r   r
   r
      s    2$ & Gh&
.
%
 G2 H)!YW5 "+*K,!**K,%%C%&6&&F&TFr   r
   N)rG   
__future__r   typingr   r   pandas.core.baser   pandas.io.formats.printingr   r   r
    r   r   <module>r[      s,    #
 * 3]'t ]'r   