pvl.dns.parse_prefix: fixup doc
authorTero Marttila <tero.marttila@aalto.fi>
Thu, 26 Feb 2015 16:17:06 +0200
changeset 499 51bab9649e77
parent 498 d472f2eb266b
child 500 60f2be893641
pvl.dns.parse_prefix: fixup doc
pvl/dns/reverse.py
--- a/pvl/dns/reverse.py	Thu Feb 26 16:14:01 2015 +0200
+++ b/pvl/dns/reverse.py	Thu Feb 26 16:17:06 2015 +0200
@@ -89,14 +89,18 @@
 
 def parse_prefix (prefix) :
     """
-        Return an ipaddr.IPNetwork from given IPv4/IPv6 prefix.
+        Return an ipaddr.IPNetwork from given filesystem-compatbile IPv4/IPv6 prefix-ish variant.
+
+        Supports partial IPv4 prefixes on octet boundaries.
+        Supports partial IPv6 prefixes on nibble boundaries.
+        Supports IPv4 prefxies using "-" as the prefix separator in place of "/".
 
         >>> parse_prefix('127.0.0.0/8')
         IPv4Network('127.0.0.0/8')
         >>> parse_prefix('192.0.2.128/26')
         IPv4Network('192.0.2.128/26')
         >>> parse_prefix('192.0.2.128-26')
-        IPv4Network('192.0.2.128-26')
+        IPv4Network('192.0.2.128/26')
         >>> parse_prefix('127.')
         IPv4Network('127.0.0.0/8')
         >>> parse_prefix('10')