GhostManSec
Server: Apache
System: Linux s323.xrea.com 5.15.0-164-generic #174-Ubuntu SMP Fri Nov 14 20:25:16 UTC 2025 x86_64
User: moonarc (17751)
PHP: 8.1.34
Disabled: NONE
Upload Files
File: //usr/lib/python2.7/site-packages/dns/namedict.pyc
�
�b�Wc@sKdZddlZddlZddlmZdejfd��YZdS(sDNS name dictionaryi����Ni(txrangetNameDictcBsneZdZdddgZd�Zd�Zd�Zd�Zd�Zd	�Z	d
�Z
d�Zd�ZRS(
sA dictionary whose keys are dns.name.Name objects.
    @ivar max_depth: the maximum depth of the keys that have ever been
    added to the dictionary.
    @type max_depth: int
    @ivar max_depth_items: the number of items of maximum depth
    @type max_depth_items: int
    t	max_depthtmax_depth_itemst__storecOs8t�|_d|_d|_|jt||��dS(Ni(tdictt_NameDict__storeRRtupdate(tselftargstkwargs((s0/usr/lib/python2.7/site-packages/dns/namedict.pyt__init__-s		cCs\t|�|jkr(|jd|_n0t|�|jkrXt|�|_d|_ndS(Ni(tlenRR(Rtkey((s0/usr/lib/python2.7/site-packages/dns/namedict.pyt__update_max_depth3s
cCs|j|S(N(R(RR
((s0/usr/lib/python2.7/site-packages/dns/namedict.pyt__getitem__:scCsBt|tjj�s$td��n||j|<|j|�dS(NsNameDict key must be a name(t
isinstancetdnstnametNamet
ValueErrorRt_NameDict__update_max_depth(RR
tvalue((s0/usr/lib/python2.7/site-packages/dns/namedict.pyt__setitem__=s
cCsz|jj|�}t|�|jkr:|jd|_n|jdkrvd|_x!|jD]}|j|�q\WndS(Nii(RtpopRRRR(RR
Rtk((s0/usr/lib/python2.7/site-packages/dns/namedict.pyt__delitem__Cs	cCs
t|j�S(N(titerR(R((s0/usr/lib/python2.7/site-packages/dns/namedict.pyt__iter__LscCs
t|j�S(N(RR(R((s0/usr/lib/python2.7/site-packages/dns/namedict.pyt__len__OscCs
||jkS(N(R(RR
((s0/usr/lib/python2.7/site-packages/dns/namedict.pythas_keyRscCs�t|�}||jkr'|j}nxHt|d�D]6}tjj||�}||kr8|||fSq8W|tjj}tjj|fS(sFind the deepest match to I{name} in the dictionary.

        The deepest match is the longest name in the dictionary which is
        a superdomain of I{name}.

        @param name: the name
        @type name: dns.name.Name object
        @rtype: (key, value) tuple
        i(RRRRRRtempty(RRtdepthtitntv((s0/usr/lib/python2.7/site-packages/dns/namedict.pytget_deepest_matchUs(
t__name__t
__module__t__doc__t	__slots__RRRRRRRRR$(((s0/usr/lib/python2.7/site-packages/dns/namedict.pyR!s									(R'tcollectionstdns.nameRt_compatRtMutableMappingR(((s0/usr/lib/python2.7/site-packages/dns/namedict.pyt<module>s