]> git.ipfire.org Git - thirdparty/dnspython.git/commitdiff
doc more misc things
authorBob Halley <halley@dnspython.org>
Sun, 15 Jan 2017 14:18:35 +0000 (06:18 -0800)
committerBob Halley <halley@dnspython.org>
Sun, 15 Jan 2017 14:18:35 +0000 (06:18 -0800)
dns/set.py
dns/ttl.py
doc/exceptions.rst
doc/utilities.rst

index 7a137ed44604f81328bda80b39dd6b40c2bcdfcd..b419ff4ac26dfd4e3a4e1f29baaf9b301174b2cd 100644 (file)
@@ -28,8 +28,7 @@ class Set(object):
     def __init__(self, items=None):
         """Initialize the set.
 
-        @param items: the initial set of items
-        @type items: any iterable or None
+        *items*, an iterable or ``None``, the initial set of items.
         """
 
         self.items = []
index a27d825180274911f82482fe2679a3e195fdb20d..4690728dc40da457779dc3576afcf2530a4e1321 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (C) 2003-2007, 2009-2011 Nominum, Inc.
+# Copyright (C) 2003-2017 Nominum, Inc.
 #
 # Permission to use, copy, modify, and distribute this software and its
 # documentation for any purpose with or without fee is hereby granted,
@@ -20,7 +20,6 @@ from ._compat import long
 
 
 class BadTTL(dns.exception.SyntaxError):
-
     """DNS TTL value is not well-formed."""
 
 
@@ -29,10 +28,11 @@ def from_text(text):
 
     The BIND 8 units syntax for TTLs (e.g. '1w6d4h3m10s') is supported.
 
-    @param text: the textual TTL
-    @type text: string
-    @raises dns.ttl.BadTTL: the TTL is not well-formed
-    @rtype: int
+    *text*, a ``text``, the textual TTL.
+
+    Raises ``dns.ttl.BadTTL`` if the TTL is not well-formed.
+
+    Returns an ``int``.
     """
 
     if text.isdigit():
index 8f50843f6092a5e2ef4da5be3cedd5b2c0dee5b0..879e593a98e9a406b29c281baee3a670c11fdc43 100644 (file)
@@ -49,3 +49,8 @@ dns.rdataset Exceptions
                    
 .. autoexception:: dns.rdataset.DifferingCovers
 .. autoexception:: dns.rdataset.IncompatibleTypes
+
+dns.ttl Exceptions
+------------------
+
+.. autoexception:: dns.ttl.BadTTL
index 1f5475d1112010e918bd83542381cc485218cd6f..293736149fae9d553eadeac6850e55f8ce167ed8 100644 (file)
@@ -11,3 +11,8 @@ Miscellaneous Utilities
 
 .. automodule:: dns.ipv6
    :members:
+
+.. autofunction:: dns.ttl.from_text
+
+.. automodule:: dns.set
+   :members: