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`` attribute. 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 RRset'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__

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)