%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /lib/python3/dist-packages/dns/__pycache__/
Upload File :
Create Path :
Current File : //lib/python3/dist-packages/dns/__pycache__/immutable.cpython-312.pyc

�

5��e����ddlZddlmZmZddlmZeGd�dejj��Z	dedefd�Z
y)	�N)�Any�Callable)�	immutablec	�p�eZdZdefdededegejjffd�Z
d�Zd�Zd�Z
d	�Zy
)�DictF�
dictionary�no_copy�map_factoryc���|r3t|tjj�r||_d|_y|�|_|jj|�d|_y)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�collections�abc�MutableMapping�_odict�update�_hash)�selfrr	r
s    �//usr/lib/python3/dist-packages/dns/immutable.py�__init__z
Dict.__init__sN���z�*�k�o�o�.L�.L�M�$�D�K���
�&�-�D�K��K�K���z�*���
�c�8�|jj|�S�N)r�__getitem__)r�keys  rrzDict.__getitem__s���{�{�&�&�s�+�+rc���|j�Od}t|jj��D]}|t	|�z}�t
j
|d|�|jS)Nrr)r�sortedr�keys�hash�object�__setattr__)r�hrs   r�__hash__z
Dict.__hash__!s[���:�:���A��d�k�k�.�.�0�1�
���T�#�Y���
����t�W�a�0��z�z�rc�,�t|j�Sr)�lenr�rs r�__len__zDict.__len__*s���4�;�;��rc�,�t|j�Sr)�iterrr%s r�__iter__z
Dict.__iter__-s���D�K�K� � rN)�__name__�
__module__�__qualname__�dictr�boolrr
rrrrr"r&r)�rrrr	sS��
�DH�	������b�+�/�/�"@�"@�@�A�	�&,�� �!rr�o�returnc��t|t�rt|�St|t�r	t	|�|St|t�rtd�|D��St|t�r<t�}|j�D]\}}t|�||<�t|d�S|S#t
$rtd�|D��cYSwxYw)z3
    Convert mutable types to immutable types.
    c3�2K�|]}t|����y�wr��constify��.0�elts  r�	<genexpr>zconstify.<locals>.<genexpr><s����4�3��#��4���c3�2K�|]}t|����y�wrr4r6s  rr9zconstify.<locals>.<genexpr>>s����0�s�X�c�]�0�r:T)r�	bytearray�bytes�tupler�	Exception�listr-�itemsr5r)r0�cdict�k�vs    rr5r51s����!�Y���Q�x���!�U��	5���G��H��!�T���0�a�0�0�0��!�T������G�G�I�	#�D�A�q���{�E�!�H�	#��E�4� � ��H���	5��4�!�4�4�4�	5�s�B*�*C�C)�collections.abcr
�typingrr�dns._immutable_ctxrr�Mappingrr5r/rr�<module>rIsI��� �(��$!�;�?�?�"�"�$!��$!�N
��
��
r

Zerion Mini Shell 1.0