cpython: cf8d42596a44 (original) (raw)

--- a/Doc/library/ipaddress.rst +++ b/Doc/library/ipaddress.rst @@ -196,10 +196,6 @@ write code that handles both IP versions >>> ipaddress.IPv6Address('2001:db8::1000') IPv6Address('2001:db8::1000')

+

+

.. attribute:: broadcast_address

.. attribute:: host mask

.. attribute:: with_prefixlen

+

.. attribute:: with_netmask

.. attribute:: with_hostmask

.. attribute:: num_addresses

.. attribute:: prefixlen

.. method:: hosts()

.. method:: overlaps(other)

.. method:: address_exclude(network)

.. method:: subnets(prefixlen_diff=1, new_prefix=None)

.. method:: supernet(prefixlen_diff=1, new_prefix=None)

.. method:: compare_networks(other)

.. class:: IPv6Network(address, strict=True) @@ -492,7 +518,7 @@ so to avoid duplication they are only do Construct an IPv6 network definition. address can be one of the following: 1. A string consisting of an IP address and an optional mask, separated by

@@ -516,10 +542,38 @@ so to avoid duplication they are only do then :exc:ValueError is raised. Otherwise, the host bits are masked out to determine the appropriate network address.

+

Operators @@ -529,12 +583,14 @@ Network objects support some operators. only be applied between compatible objects (i.e. IPv4 with IPv4, IPv6 with IPv6). + Logical operators """"""""""""""""" Network objects can be compared with the usual set of logical operators, similarly to address objects. + Iteration """"""""" @@ -563,6 +619,7 @@ example:: IPv4Address('192.0.2.14') IPv4Address('192.0.2.15') + Networks as containers of addresses """""""""""""""""""""""""""""""""""