File: //home/arjun/projects/env/lib/python3.10/site-packages/dns/__pycache__/namedict.cpython-310.pyc
o
!we� � @ s, d Z ddlmZ ddlZG dd� de�ZdS )zDNS name dictionary� )�MutableMappingNc sh e Zd ZdZg d�Z� fdd�Zdd� Zdd� Zd d
� Zdd� Z d
d� Z
dd� Zdd� Zdd� 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_items�__storec s6 t � �� t� | _d| _d| _| �t|i |��� d S )Nr )�super�__init__�dict�_NameDict__storer r �update)�self�args�kwargs�� __class__� �E/home/arjun/projects/env/lib/python3.10/site-packages/dns/namedict.pyr - s
zNameDict.__init__c C sD t |�| jkr| jd | _d S t |�| jkr t |�| _d| _d S d S )N� )�lenr r �r �keyr r r �__update_max_depth6 s
�zNameDict.__update_max_depthc C s
| j | S �N�r
r r r r �__getitem__= �
zNameDict.__getitem__c C s. t |tjj�std��|| j|<