summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorEric V. Smith <eric@trueblade.com>2014-04-14 16:58:07 (GMT)
committerEric V. Smith <eric@trueblade.com>2014-04-14 16:58:07 (GMT)
commitebdaaf40875fb8e29c7fbad5cc67221123995a8e (patch)
tree4feedc5959563cc17fdb855348951a88e7c4c598 /Doc
parent6b2308803506321019bfe2ec1f2303ebb97ec998 (diff)
downloadcpython-ebdaaf40875fb8e29c7fbad5cc67221123995a8e.zip
cpython-ebdaaf40875fb8e29c7fbad5cc67221123995a8e.tar.gz
cpython-ebdaaf40875fb8e29c7fbad5cc67221123995a8e.tar.bz2
Issue #20480: Add ipaddress.reverse_pointer. Patch by Leon Weber.
Diffstat (limited to 'Doc')
-rw-r--r--Doc/library/ipaddress.rst15
1 files changed, 15 insertions, 0 deletions
diff --git a/Doc/library/ipaddress.rst b/Doc/library/ipaddress.rst
index 9625e71..0bc27ff 100644
--- a/Doc/library/ipaddress.rst
+++ b/Doc/library/ipaddress.rst
@@ -146,6 +146,20 @@ write code that handles both IP versions correctly.
the appropriate length (most significant octet first). This is 4 bytes
for IPv4 and 16 bytes for IPv6.
+ .. attribute:: reverse_pointer
+
+ The name of the reverse DNS PTR record for the IP address, e.g.::
+
+ >>> ipaddress.ip_address("127.0.0.1").reverse_pointer
+ '1.0.0.127.in-addr.arpa'
+ >>> ipaddress.ip_address("2001:db8::1").reverse_pointer
+ '1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.8.b.d.0.1.0.0.2.ip6.arpa'
+
+ This is the name that could be used for performing a PTR lookup, not the
+ resolved hostname itself.
+
+ .. versionadded:: 3.5
+
.. attribute:: is_multicast
``True`` if the address is reserved for multicast use. See
@@ -226,6 +240,7 @@ write code that handles both IP versions correctly.
:class:`IPv4Address` class:
.. attribute:: packed
+ .. attribute:: reverse_pointer
.. attribute:: version
.. attribute:: max_prefixlen
.. attribute:: is_multicast