summaryrefslogtreecommitdiff
path: root/dns
diff options
context:
space:
mode:
authorBob Halley <halley@dnspython.org>2012-04-08 14:22:42 +0100
committerBob Halley <halley@dnspython.org>2012-04-08 14:22:42 +0100
commitefc5e26851a43ffc74a4edf67bc8a94ae801e119 (patch)
tree3f70bcaedab0ad493baf654c22ad44673b1527ea /dns
parentea13fd9c21194a54055326bf6f5219d1e983641f (diff)
downloaddnspython-efc5e26851a43ffc74a4edf67bc8a94ae801e119.tar.gz
doco fixes
Diffstat (limited to 'dns')
-rw-r--r--dns/e164.py4
-rw-r--r--dns/edns.py4
-rw-r--r--dns/ipv4.py12
-rw-r--r--dns/query.py30
-rw-r--r--dns/resolver.py3
-rw-r--r--dns/tokenizer.py4
6 files changed, 37 insertions, 20 deletions
diff --git a/dns/e164.py b/dns/e164.py
index d6dcd1b..68f0a31 100644
--- a/dns/e164.py
+++ b/dns/e164.py
@@ -32,7 +32,7 @@ def from_e164(text, origin=public_enum_domain):
@type text: str
@param origin: The domain in which the number should be constructed.
The default is e164.arpa.
- @type: dns.name.Name object or None
+ @type origin: dns.name.Name object or None
@rtype: dns.name.Name object
"""
parts = [d for d in text if d.isdigit()]
@@ -45,7 +45,7 @@ def to_e164(name, origin=public_enum_domain, want_plus_prefix=True):
@type name: dns.name.Name object.
@param origin: A domain containing the ENUM domain name. The
name is relativized to this domain before being converted to text.
- @type: dns.name.Name object or None
+ @type origin: dns.name.Name object or None
@param want_plus_prefix: if True, add a '+' to the beginning of the
returned number.
@rtype: str
diff --git a/dns/edns.py b/dns/edns.py
index f8b6009..4d4eaa8 100644
--- a/dns/edns.py
+++ b/dns/edns.py
@@ -23,8 +23,8 @@ class Option(object):
def __init__(self, otype):
"""Initialize an option.
- @param rdtype: The rdata type
- @type rdtype: int
+ @param otype: The rdata type
+ @type otype: int
"""
self.otype = otype
diff --git a/dns/ipv4.py b/dns/ipv4.py
index e117966..85ab48f 100644
--- a/dns/ipv4.py
+++ b/dns/ipv4.py
@@ -20,12 +20,24 @@ import struct
import dns.exception
def inet_ntoa(address):
+ """Convert an IPv4 address in network form to text form.
+
+ @param address: The IPv4 address
+ @type address: string
+ @returns: string
+ """
if len(address) != 4:
raise dns.exception.SyntaxError
return '%u.%u.%u.%u' % (ord(address[0]), ord(address[1]),
ord(address[2]), ord(address[3]))
def inet_aton(text):
+ """Convert an IPv4 address in text form to network form.
+
+ @param text: The IPv4 address
+ @type text: string
+ @returns: string
+ """
parts = text.split('.')
if len(parts) != 4:
raise dns.exception.SyntaxError
diff --git a/dns/query.py b/dns/query.py
index 2ed0b6a..c141612 100644
--- a/dns/query.py
+++ b/dns/query.py
@@ -46,12 +46,15 @@ def _compute_expiration(timeout):
return time.time() + timeout
def _poll_for(fd, readable, writable, error, timeout):
- """
- @param fd: File descriptor (int).
- @param readable: Whether to wait for readability (bool).
- @param writable: Whether to wait for writability (bool).
- @param expiration: Deadline timeout (expiration time, in seconds (float)).
-
+ """Poll polling backend.
+ @param fd: File descriptor
+ @type fd: int
+ @param readable: Whether to wait for readability
+ @type readable: bool
+ @param writable: Whether to wait for writability
+ @type writable: bool
+ @param timeout: Deadline timeout (expiration time, in seconds)
+ @type timeout: float
@return True on success, False on timeout
"""
event_mask = 0
@@ -73,12 +76,15 @@ def _poll_for(fd, readable, writable, error, timeout):
return bool(event_list)
def _select_for(fd, readable, writable, error, timeout):
- """
- @param fd: File descriptor (int).
- @param readable: Whether to wait for readability (bool).
- @param writable: Whether to wait for writability (bool).
- @param expiration: Deadline timeout (expiration time, in seconds (float)).
-
+ """Select polling backend.
+ @param fd: File descriptor
+ @type fd: int
+ @param readable: Whether to wait for readability
+ @type readable: bool
+ @param writable: Whether to wait for writability
+ @type writable: bool
+ @param timeout: Deadline timeout (expiration time, in seconds)
+ @type timeout: float
@return True on success, False on timeout
"""
rset, wset, xset = [], [], []
diff --git a/dns/resolver.py b/dns/resolver.py
index 437e14e..ce77ac1 100644
--- a/dns/resolver.py
+++ b/dns/resolver.py
@@ -316,8 +316,7 @@ class LRUCache(object):
def __init__(self, max_size=100000):
"""Initialize a DNS cache.
- @param max_size: The maximum number of nodes to cache; the default is
- 100000. Must be > 1.
+ @param max_size: The maximum number of nodes to cache; the default is 100000. Must be > 1.
@type max_size: int
"""
self.data = {}
diff --git a/dns/tokenizer.py b/dns/tokenizer.py
index 4bff7b6..ab56873 100644
--- a/dns/tokenizer.py
+++ b/dns/tokenizer.py
@@ -62,9 +62,9 @@ class Token(object):
@param ttype: The token type
@type ttype: int
- @ivar value: The token value
+ @param value: The token value
@type value: string
- @ivar has_escape: Does the token value contain escapes?
+ @param has_escape: Does the token value contain escapes?
@type has_escape: bool
"""
self.ttype = ttype