File: //opt/alt/python37/lib/python3.7/site-packages/dns/__pycache__/rrset.cpython-37.pyc
B
��f�# � @ sN d Z ddlmZmZmZmZmZmZ ddlZ ddl
Z ddlZ ddlZ G dd� de j
j�Zdee jjef eee jjef ee jjef ee ee jj ee jj eee jj ed�
dd �Zee jjef eee jjef ee jjef eed
�dd�Zdee jjef eee jj ee jj ed
�dd�Zee jjef eeed�dd�ZdS )z)DNS RRsets (an RRset is a named rdataset)� )�Any�cast�
Collection�Dict�Optional�UnionNc s< e Zd ZdZddgZejjdfejj ej
jejjejje
ej
j d�� fdd�
Z� fdd �Zd
d� Zdd
� Z� fdd�Zeeed�� fdd�Zd ejj ej
jejjejje
ej
j ed�� fdd�
Zd!e
ejj eeeef ed�� fdd�
Zd"ee
ejj e
ejj eeef ed�� fdd�
Zejjd�dd�Z� Z S )#�RRseta6 A DNS RRset (named rdataset).
RRset inherits from Rdataset, and RRsets can be treated as
Rdatasets in most cases. There are, however, a few notable
exceptions. RRsets have different to_wire() and to_text() method
arguments, reflecting the fact that RRsets always have an owner
name.
�name�deletingN)r �rdclass�rdtype�coversr
c s t � �|||� || _|| _dS )zCreate a new RRset.N)�super�__init__r r
)�selfr r r r
r
)� __class__� �:/opt/alt/python37/lib/python3.7/site-packages/dns/rrset.pyr ) s
zRRset.__init__c s t � �� }| j|_| j|_|S )N)r �_cloner r
)r �obj)r r r r 7 s
zRRset._clonec C s� | j dkrd}ndtj�| j � d }| jd k rDdtj�| j� }nd}dt| j� d tj�| j� d tj�| j � | | d | �
� d S )
Nr � �(�)z delete=z<DNS � z RRset: �>)r
�dns� rdatatype�to_textr
�
rdataclass�strr r r Z_rdata_repr)r ZctextZdtextr r r �__repr__= s
zRRset.__repr__c C s | � � S )N)r )r r r r �__str__T s z
RRset.__str__c s: t |t�r| j|jkr.dS nt |tjj�s.dS t� �|�S )NF)�
isinstancer r r �rdataset�Rdatasetr �__eq__)r �other)r r r r% W s
zRRset.__eq__)�args�kwargs�returnc s0 t |d tjj�r| j||�S t� j||�S dS )a� Does this rrset match the specified attributes?
Behaves as :py:func:`full_match()` if the first argument is a
``dns.name.Name``, and as :py:func:`dns.rdataset.Rdataset.match()`
otherwise.
(This behavior fixes a design mistake where the signature of this
method became incompatible with that of its superclass. The fix
makes RRsets matchable as Rdatasets while preserving backwards
compatibility.)
r N)r"