HEX
Server: LiteSpeed
System: Linux srv146.niagahoster.com 4.18.0-553.30.1.lve.el8.x86_64 #1 SMP Tue Dec 3 01:21:19 UTC 2024 x86_64
User: kodi1989 (1633)
PHP: 8.1.34
Disabled: symlink,shell_exec,exec,popen,system,dl,passthru,escapeshellarg,escapeshellcmd,show_source,pcntl_exec
Upload Files
File: //opt/alt/python37/lib/python3.7/site-packages/dns/__pycache__/immutable.cpython-37.pyc
B

��f-�@sLddlmZddlZddlmZeGdd�dejj��Zeed�dd�Z	dS)	�)�AnyN)�	immutablec@s>eZdZdeed�dd�Zdd�Zdd�Zd	d
�Zdd�Z	d
S)�DictF)�
dictionary�no_copycCs*|rt|t�r||_n
t|�|_d|_dS)aMake an immutable dictionary from the specified dictionary.

        If *no_copy* is `True`, then *dictionary* will be wrapped instead
        of copied.  Only set this if you are sure there will be no external
        references to the dictionary.
        N)�
isinstance�dict�_odict�_hash)�selfrr�r�>/opt/alt/python37/lib/python3.7/site-packages/dns/immutable.py�__init__s
z
Dict.__init__cCs|j�|�S)N)r	�__getitem__)r�keyrrr
rszDict.__getitem__cCsF|jdkr@d}x"t|j���D]}|t|�N}qWt�|d|�|jS)Nrr
)r
�sortedr	�keys�hash�object�__setattr__)r�hrrrr
�__hash__s
z
Dict.__hash__cCs
t|j�S)N)�lenr	)rrrr
�__len__%szDict.__len__cCs
t|j�S)N)�iterr	)rrrr
�__iter__(sz
Dict.__iter__N)F)
�__name__�
__module__�__qualname__r�boolrrrrrrrrr
r
s

	r)�o�returncCs�t|t�rt|�St|t�rLyt|�|Stk
rJtdd�|D��SXt|t�rhtdd�|D��St|t�r�t�}x |��D]\}}t	|�||<q�Wt
|d�S|S)z3
    Convert mutable types to immutable types.
    css|]}t|�VqdS)N)�constify)�.0�eltrrr
�	<genexpr>7szconstify.<locals>.<genexpr>css|]}t|�VqdS)N)r")r#r$rrr
r%9sT)r�	bytearray�bytes�tupler�	Exception�listr�itemsr"r)r Zcdict�k�vrrr
r",s 




r")
�typingr�collections.abc�collectionsZdns._immutable_ctxr�abc�Mappingrr"rrrr
�<module>s
!