Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(187745)

Delta Between Two Patch Sets: Doc/library/ipaddress.rst

Issue 20480: Add ipaddress property to get reverse DNS name
Left Patch Set: Created 5 years, 5 months ago
Right Patch Set: Created 5 years, 5 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
« no previous file with change/comment | « no previous file | Lib/ipaddress.py » ('j') | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
1 :mod:`ipaddress` --- IPv4/IPv6 manipulation library 1 :mod:`ipaddress` --- IPv4/IPv6 manipulation library
2 =================================================== 2 ===================================================
3 3
4 .. module:: ipaddress 4 .. module:: ipaddress
5 :synopsis: IPv4/IPv6 manipulation library. 5 :synopsis: IPv4/IPv6 manipulation library.
6 .. moduleauthor:: Peter Moody 6 .. moduleauthor:: Peter Moody
7 7
8 **Source code:** :source:`Lib/ipaddress.py` 8 **Source code:** :source:`Lib/ipaddress.py`
9 9
10 -------------- 10 --------------
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 151
152 The binary representation of this address - a :class:`bytes` object of 152 The binary representation of this address - a :class:`bytes` object of
153 the appropriate length (most significant octet first). This is 4 bytes 153 the appropriate length (most significant octet first). This is 4 bytes
154 for IPv4 and 16 bytes for IPv6. 154 for IPv4 and 16 bytes for IPv6.
155 155
156 .. attribute:: reverse_pointer 156 .. attribute:: reverse_pointer
157 157
158 The name of the reverse DNS PTR record for the IP address, e.g.:: 158 The name of the reverse DNS PTR record for the IP address, e.g.::
159 159
160 >>> ipaddress.ip_address("127.0.0.1").reverse_pointer 160 >>> ipaddress.ip_address("127.0.0.1").reverse_pointer
161 '1.0.0.127.in-addr.arpa.' 161 '1.0.0.127.in-addr.arpa'
162 >>> ipaddress.ip_address("2001:db8::1").reverse_pointer 162 >>> ipaddress.ip_address("2001:db8::1").reverse_pointer
163 '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.a rpa.' 163 '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.a rpa'
164 164
165 This is the name that could be used for performing a PTR lookup, not the 165 This is the name that could be used for performing a PTR lookup, not the
166 resolved hostname itself. 166 resolved hostname itself.
167 167
168 .. versionadded:: 3.5 168 .. versionadded:: 3.5
169 169
170 .. attribute:: is_multicast 170 .. attribute:: is_multicast
171 171
172 ``True`` if the address is reserved for multicast use. See 172 ``True`` if the address is reserved for multicast use. See
173 :RFC:`3171` (for IPv4) or :RFC:`2373` (for IPv6). 173 :RFC:`3171` (for IPv4) or :RFC:`2373` (for IPv6).
(...skipping 645 matching lines...) Expand 10 before | Expand all | Expand 10 after
819 module defines the following exceptions: 819 module defines the following exceptions:
820 820
821 .. exception:: AddressValueError(ValueError) 821 .. exception:: AddressValueError(ValueError)
822 822
823 Any value error related to the address. 823 Any value error related to the address.
824 824
825 825
826 .. exception:: NetmaskValueError(ValueError) 826 .. exception:: NetmaskValueError(ValueError)
827 827
828 Any value error related to the netmask. 828 Any value error related to the netmask.
LEFTRIGHT
« no previous file | Lib/ipaddress.py » ('j') | Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Toggle Comments ('s')

RSS Feeds Recent Issues | This issue
This is Rietveld 894c83f36cb7+