[Python-checkins] cpython: whatsnew: ipaddress is_global

r.david.murray python-checkins at python.org
Thu Mar 6 19:41:11 CET 2014


http://hg.python.org/cpython/rev/fa3efccb9888
changeset: 89491:fa3efccb9888
user: R David Murray <rdmurray at bitdance.com>
date: Thu Mar 06 11:51:37 2014 -0500
summary:
 whatsnew: ipaddress is_global
Also tweaked the docs a bit and added the missing entry for
the ipv6 is_global.
files:
 Doc/library/ipaddress.rst | 18 +++++++++++++-----
 Doc/whatsnew/3.4.rst | 4 ++++
 2 files changed, 17 insertions(+), 5 deletions(-)
diff --git a/Doc/library/ipaddress.rst b/Doc/library/ipaddress.rst
--- a/Doc/library/ipaddress.rst
+++ b/Doc/library/ipaddress.rst
@@ -154,16 +154,16 @@
 .. attribute:: is_private
 
 ``True`` if the address is allocated for private networks. See
- iana-ipv4-special-registry (for IPv4) or iana-ipv6-special-registry
+ iana-ipv4-special-registry_ (for IPv4) or iana-ipv6-special-registry_
 (for IPv6).
 
 .. attribute:: is_global
 
 ``True`` if the address is allocated for public networks. See
- iana-ipv4-special-registry (for IPv4) or iana-ipv6-special-registry
+ iana-ipv4-special-registry_ (for IPv4) or iana-ipv6-special-registry_
 (for IPv6).
 
- .. versionadded:: 3.4
+ .. versionadded:: 3.4
 
 .. attribute:: is_unspecified
 
@@ -184,6 +184,9 @@
 ``True`` if the address is reserved for link-local usage. See
 :RFC:`3927`.
 
+.. _iana-ipv4-special-registry: http://www.iana.org/assignments/iana-ipv4-special-registry/iana-ipv4-special-registry.xhtml
+.. _iana-ipv6-special-registry: http://www.iana.org/assignments/iana-ipv6-special-registry/iana-ipv6-special-registry.xhtml
+
 
 .. class:: IPv6Address(address)
 
@@ -218,18 +221,23 @@
 The long form of the address representation, with all leading zeroes and
 groups consisting entirely of zeroes included.
 
+
+ For the following attributes, see the corresponding documention of the
+ :class:`IPv4Address` class:
+
 .. attribute:: packed
 .. attribute:: version
 .. attribute:: max_prefixlen
 .. attribute:: is_multicast
 .. attribute:: is_private
+ .. attribute:: is_global
 .. attribute:: is_unspecified
 .. attribute:: is_reserved
 .. attribute:: is_loopback
 .. attribute:: is_link_local
 
- Refer to the corresponding attribute documentation in
- :class:`IPv4Address`
+ .. versionadded:: 3.4
+ is_global
 
 .. attribute:: is_site_local
 
diff --git a/Doc/whatsnew/3.4.rst b/Doc/whatsnew/3.4.rst
--- a/Doc/whatsnew/3.4.rst
+++ b/Doc/whatsnew/3.4.rst
@@ -901,6 +901,10 @@
 by the normal standard library requirements to maintain backwards
 compatibility.
 
+A new :attr:`~ipaddress.IPv4Address.is_global` property is ``True`` if
+an address is globally routeable. (Contributed by Peter Moody in
+:issue:`17400`.)
+
 
 logging
 -------
-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list

AltStyle によって変換されたページ (->オリジナル) /