Skip to content

Commit defdace

Browse files
author
Matthieu Lienart
committed
gh-136752: clarify ipaddress documentation of the is_reserved property
1 parent 03017a8 commit defdace

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Doc/library/ipaddress.rst

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,10 @@ write code that handles both IP versions correctly. Address objects are
240240

241241
.. attribute:: is_reserved
242242

243-
``True`` if the address is otherwise IETF reserved.
243+
``True`` if the address is *labelled* as reserved by the IETF:
244+
245+
* IPv4 address ``240.0.0.0/4`` named ``Reserved`` (see iana-ipv4-special-registry_)
246+
* IPv6 addresses allocated as ``Reserved by IETF`` for future use (see iana-ipv6-address-space_)
244247

245248
.. attribute:: is_loopback
246249

@@ -261,6 +264,7 @@ write code that handles both IP versions correctly. Address objects are
261264

262265
.. _iana-ipv4-special-registry: https://www.iana.org/assignments/iana-ipv4-special-registry/iana-ipv4-special-registry.xhtml
263266
.. _iana-ipv6-special-registry: https://www.iana.org/assignments/iana-ipv6-special-registry/iana-ipv6-special-registry.xhtml
267+
.. _iana-ipv6-address-space: https://www.iana.org/assignments/ipv6-address-space/ipv6-address-space.xhtml
264268

265269
.. method:: IPv4Address.__format__(fmt)
266270

0 commit comments

Comments
 (0)