dns :: resolver :: Answer :: Class Answer
[hide private]
[frames] | no frames]

Class Answer

source code

object --+
         |
        Answer

DNS stub resolver answer

Instances of this class bundle up the result of a successful DNS resolution.

For convenience, the answer object implements much of the sequence protocol, forwarding to its rrset. E.g. "for a in answer" is equivalent to "for a in answer.rrset", "answer[i]" is equivalent to "answer.rrset[i]", and "answer[i:j]" is equivalent to "answer.rrset[i:j]".

Note that CNAMEs or DNAMEs in the response may mean that answer node's name might not be the query name.

Instance Methods [hide private]
 
__init__(self, qname, rdtype, rdclass, response, raise_on_no_answer=True)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
 
__getattr__(self, attr) source code
 
__len__(self) source code
 
__iter__(self) source code
 
__getitem__(self, i) source code
 
__delitem__(self, i) source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Instance Variables [hide private]
dns.name.Name object canonical_name
The canonical name of the query name
float (seconds since the epoch) expiration
The time when the answer expires
dns.name.Name object qname
The query name
int rdclass
The query class
int rdtype
The query type
dns.message.Message object response
The response message
dns.rrset.RRset object rrset
The answer
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, qname, rdtype, rdclass, response, raise_on_no_answer=True)
(Constructor)

source code 

x.__init__(...) initializes x; see help(type(x)) for signature

Overrides: object.__init__
(inherited documentation)