
    Eg                    l    d Z ddlmZ ddlmZmZ ddlmZ ddlm	Z	 erddl
mZ  G d dee          Zd	S )
zj
frozen (immutable) data structures to support MultiIndexing

These are used for:

- .names (FrozenList)

    )annotations)TYPE_CHECKINGNoReturn)PandasObjectpprint_thing)Selfc                       e Zd ZdZd fdZddZexZZ fdZddZ	d fdZ
e
Zd 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.
    returnc                    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     O/var/www/sysmax/venv/lib/python3.11/site-packages/pandas/core/indexes/frozen.pyunionzFrozenList.union"   sH     eU## 	 KKEtDzz%''//%00111    c                n    t                    fd| D             } t          |           |          S )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.
        c                    g | ]}|v|	S  r   ).0xr   s     r   
<listcomp>z)FrozenList.difference.<locals>.<listcomp>C   s    222a1E>>>>>r   )setr   )r   r   temps    ` r   
differencezFrozenList.difference4   s?     E

22224222tDzz$r   c                    t          |t                    r7 t          |           t                                          |                    S t                                          |          S N)r   slicer   r   __getitem__)r   nr   s     r   r'   zFrozenList.__getitem__L   sU    a 	64::egg11!44555ww""1%%%r   r	   c                    t          |t                    rt          |          } t          |           |t          |           z             S r%   )r   r   r   r   )r   r   s     r   __radd__zFrozenList.__radd__Q   s@    eU## 	 KKEtDzz%$t**,---r   r   objectboolc                    t          |t          t          f          rt          |          }t	                                          |          S r%   )r   r   r   r   r   __eq__r   s     r   r.   zFrozenList.__eq__V   s;    eeZ011 	 KKEww~~e$$$r   c                r     t          |           t                                          |                    S r%   )r   r   __mul__r   s     r   r0   zFrozenList.__mul__]   s)    tDzz%''//%00111r   c                @    t          |           t          |           ffS r%   )r   r   r   s    r   
__reduce__zFrozenList.__reduce__b   s    DzzDJJ=((r   intc                :    t          t          |                     S r%   )hashr   r2   s    r   __hash__zFrozenList.__hash__f   s    E$KK   r   r   c                L    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._disabledi   s'     WDJJ/WWWXXXr   strc                &    t          | dd          S )NT)	
)quote_stringsescape_charsr   r2   s    r   __str__zFrozenList.__str__o   s    DCUVVVVr   c                P    t          |           j         dt          |            dS )N())r   r;   r?   r2   s    r   __repr__zFrozenList.__repr__r   s(    t**%44D		4444r   )r   r   )r   r	   )r   r+   r   r,   )r   r4   )r   r   )r   r?   )r;   
__module____qualname____doc__r   r#   r   __iadd__r'   r*   r.   __req__r0   __imul__r3   r7   r>   rF   rJ   __setitem____setslice____delitem____delslice__popappendextendremovesortinsert__classcell__)r   s   @r   r   r      sm        2 2 2 2 2 2$       , Gh& & & & &
. . . .
% % % % % %
 G2 2 2 2 2 2 H) ) )! ! ! !Y Y Y YW W W W5 5 5 5 "+*K,!**K,%%C%&6&&F&TFFFFFr   r   N)rM   
__future__r   typingr   r   pandas.core.baser   pandas.io.formats.printingr   pandas._typingr	   r   r   r   r   r   <module>ra      s     # " " " " "       
 * ) ) ) ) ) 3 3 3 3 3 3 $######`' `' `' `' `'t `' `' `' `' `'r   