HEX
Server: LiteSpeed
System: Linux atali.colombiahosting.com.co 5.14.0-570.12.1.el9_6.x86_64 #1 SMP PREEMPT_DYNAMIC Tue May 13 06:11:55 EDT 2025 x86_64
User: coopserp (1713)
PHP: 8.2.29
Disabled: dl,exec,passthru,proc_open,proc_close,shell_exec,memory_limit,system,popen,curl_multi_exec,show_source,symlink,link,leak,listen,diskfreespace,tmpfile,ignore_user_abord,highlight_file,source,show_source,fpaththru,virtual,posix_ctermid,posix_getcwd,posix_getegid,posix_geteuid,posix_getgid,posix_getgrgid,posix_getgrnam,posix_getgroups,posix_getlogin,posix_getpgid,posix_getpgrp,posix_getpid,posix,posix_getppid,posix_getpwnam,posix_getpwuid,posix_getrlimit,posix_getsid,posix_getuid,posix_isatty,posix_kill,posix_mkfifo,posix_setegid,posix_seteuid,posix_setgid,posix_setpgid,posix_setsid,posix_setid,posix_times,posix_ttyname,posix_uname,proc_get_status,proc_nice,proc_terminate
Upload Files
File: //usr/lib/python3.9/site-packages/dns/__pycache__/namedict.cpython-39.opt-1.pyc
a

�M�e��@s,dZddlmZddlZGdd�de�ZdS)zDNS name dictionary�)�MutableMappingNcsheZdZdZgd�Z�fdd�Zdd�Zdd�Zd	d
�Zdd�Z	d
d�Z
dd�Zdd�Zdd�Z
�ZS)�NameDictz�A dictionary whose keys are dns.name.Name objects.

    In addition to being like a regular Python dictionary, this
    dictionary can also get the deepest match for a given key.
    )�	max_depth�max_depth_itemsZ__storecs6t���t�|_d|_d|_|�t|i|���dS)Nr)�super�__init__�dict�_NameDict__storerr�update)�self�args�kwargs��	__class__��0/usr/lib/python3.9/site-packages/dns/namedict.pyr-s

zNameDict.__init__cCs>t|�|jkr|jd|_nt|�|jkr:t|�|_d|_dS)N�)�lenrr�r�keyrrrZ__update_max_depth6s

zNameDict.__update_max_depthcCs
|j|S�N�r	rrrr�__getitem__=szNameDict.__getitem__cCs.t|tjj�std��||j|<|�|�dS)NzNameDict key must be a name)�
isinstance�dns�name�Name�
ValueErrorr	�_NameDict__update_max_depth)rr�valuerrr�__setitem__@s
zNameDict.__setitem__cCsP|j�|�t|�|jkr&|jd|_|jdkrLd|_|jD]}|�|�q<dS)Nrr)r	�poprrrr)rr�krrr�__delitem__Fs

zNameDict.__delitem__cCs
t|j�Sr)�iterr	�rrrr�__iter__OszNameDict.__iter__cCs
t|j�Sr)rr	r%rrr�__len__RszNameDict.__len__cCs
||jvSrrrrrr�has_keyUszNameDict.has_keycCsnt|�}||jkr|j}t|d�D]0}tj�||d��}||vr$|||fSq$|tjj}tjj|fS)a�Find the deepest match to *name* in the dictionary.

        The deepest match is the longest name in the dictionary which is
        a superdomain of *name*.  Note that *superdomain* includes matching
        *name* itself.

        *name*, a ``dns.name.Name``, the name to find.

        Returns a ``(key, value)`` where *key* is the deepest
        ``dns.name.Name``, and *value* is the value associated with *key*.
        rN)rr�rangerrr�empty)rr�depth�i�n�vrrr�get_deepest_matchXs

zNameDict.get_deepest_match)�__name__�
__module__�__qualname__�__doc__�	__slots__rrrr r#r&r'r(r/�
__classcell__rrrrr$s		r)r3�collections.abcrZdns.namerrrrrr�<module>s