ó !`Nc@s,dZddlZdefd„ƒYZdS(sDNS name dictionaryiÿÿÿÿNtNameDictcBs)eZdZd„Zd„Zd„ZRS(s´A 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 cOs&tt|ƒj||Žd|_dS(Ni(tsuperRt__init__t max_depth(tselftargstkwargs((s2/usr/lib64/python2.7/site-packages/dns/namedict.pyRscCsht|tjjƒs$tdƒ‚nt|ƒ}||jkrK||_ntt|ƒj ||ƒdS(NsNameDict key must be a name( t isinstancetdnstnametNamet ValueErrortlenRRRt __setitem__(Rtkeytvaluetdepth((s2/usr/lib64/python2.7/site-packages/dns/namedict.pyR s   cCs•t|ƒ}||jkr'|j}nxKt| dƒD]9}tjj||ƒ}|j|ƒr8|||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 RtxrangeRR R thas_keytempty(RR Rtitntv((s2/usr/lib64/python2.7/site-packages/dns/namedict.pytget_deepest_match(s  (t__name__t __module__t__doc__RR R(((s2/usr/lib64/python2.7/site-packages/dns/namedict.pyRs  (Rtdns.nameRtdictR(((s2/usr/lib64/python2.7/site-packages/dns/namedict.pyts