Skip to content

gh-136752: Clarify documentation for IPv{N}Address.is_reserved #136794

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 17 commits into from
Jul 19, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
gh-136752: clarify ipaddress documentation of the is_reserved property
  • Loading branch information
Matthieu Lienart committed Jul 19, 2025
commit defdaceb4109b9f0aba38279fbb4c70124a56dde
6 changes: 5 additions & 1 deletion Doc/library/ipaddress.rst
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,10 @@ write code that handles both IP versions correctly. Address objects are

.. attribute:: is_reserved

``True`` if the address is otherwise IETF reserved.
``True`` if the address is *labelled* as reserved by the IETF:

* IPv4 address ``240.0.0.0/4`` named ``Reserved`` (see iana-ipv4-special-registry_)
* IPv6 addresses allocated as ``Reserved by IETF`` for future use (see iana-ipv6-address-space_)

.. attribute:: is_loopback

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

.. _iana-ipv4-special-registry: https://www.iana.org/assignments/iana-ipv4-special-registry/iana-ipv4-special-registry.xhtml
.. _iana-ipv6-special-registry: https://www.iana.org/assignments/iana-ipv6-special-registry/iana-ipv6-special-registry.xhtml
.. _iana-ipv6-address-space: https://www.iana.org/assignments/ipv6-address-space/ipv6-address-space.xhtml

.. method:: IPv4Address.__format__(fmt)

Expand Down
Loading