Repository URL to install this package:
|
Version:
2.5 ▾
|
ó
EYc @ sK d Z d d l Z d d l Z d d l m Z d e j f d YZ d S( s DNS name dictionaryiÿÿÿÿNi ( t xranget NameDictc B sn e Z d Z d d d g Z d Z d Z d Z d Z d Z d Z d
Z
d Z d Z RS(
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
@ivar max_depth_items: the number of items of maximum depth
@type max_depth_items: int
t max_deptht max_depth_itemst __storec O s8 t | _ d | _ d | _ | j t | | d S( Ni ( t dictt _NameDict__storeR R t update( t selft argst kwargs( ( sR /home/tvault/.virtenv/lib/python2.7/site-packages/eventlet/support/dns/namedict.pyt __init__- s c C s\ t | | j k r( | j d | _ n0 t | | j k rX t | | _ d | _ n d S( Ni ( t lenR R ( R t key( ( sR /home/tvault/.virtenv/lib/python2.7/site-packages/eventlet/support/dns/namedict.pyt __update_max_depth3 s
c C s | j | S( N( R ( R R
( ( sR /home/tvault/.virtenv/lib/python2.7/site-packages/eventlet/support/dns/namedict.pyt __getitem__: s c C sB t | t j j s$ t d n | | j | <| j | d S( Ns NameDict key must be a name( t
isinstancet dnst namet Namet
ValueErrorR t _NameDict__update_max_depth( R R
t value( ( sR /home/tvault/.virtenv/lib/python2.7/site-packages/eventlet/support/dns/namedict.pyt __setitem__= s
c C sz | j j | } t | | j k r: | j d | _ n | j d k rv d | _ x! | j D] } | j | q\ Wn d S( Ni i ( R t popR R R R ( R R
R t k( ( sR /home/tvault/.virtenv/lib/python2.7/site-packages/eventlet/support/dns/namedict.pyt __delitem__C s c C s
t | j S( N( t iterR ( R ( ( sR /home/tvault/.virtenv/lib/python2.7/site-packages/eventlet/support/dns/namedict.pyt __iter__L s c C s
t | j S( N( R R ( R ( ( sR /home/tvault/.virtenv/lib/python2.7/site-packages/eventlet/support/dns/namedict.pyt __len__O s c C s
| | j k S( N( R ( R R
( ( sR /home/tvault/.virtenv/lib/python2.7/site-packages/eventlet/support/dns/namedict.pyt has_keyR s c C s t | } | | j k r' | j } n xH t | d D]6 } t j j | | } | | k r8 | | | f Sq8 W| t j j } t j j | f S( s Find 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 R R R R R t empty( R R t deptht it nt v( ( sR /home/tvault/.virtenv/lib/python2.7/site-packages/eventlet/support/dns/namedict.pyt get_deepest_matchU s (
t __name__t
__module__t __doc__t __slots__R R R R R R R R R$ ( ( ( sR /home/tvault/.virtenv/lib/python2.7/site-packages/eventlet/support/dns/namedict.pyR ! s ( R' t collectionst dns.nameR t _compatR t MutableMappingR ( ( ( sR /home/tvault/.virtenv/lib/python2.7/site-packages/eventlet/support/dns/namedict.pyt <module> s