We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3479737 commit 28f195cCopy full SHA for 28f195c
1 file changed
Doc/library/ipaddress.rst
@@ -721,9 +721,12 @@ dictionaries.
721
.. method:: next_network(next_prefix=None)
722
723
Finds the next closest network of prefix size *next_prefix*. If
724
- *next_prefix=None*, then the current network prefix will be used. #doctest: +NORMALIZE_WHITESPACE
+ *next_prefix=None*, then the current network prefix will be used.
725
Returns a single network object.
726
727
+ Raises :exc:`ValueError` if *next_prefix* is out of range or no further
728
+ network of the requested size exists.
729
+
730
>>> IPv4Network('192.0.2.0/24').next_network()
731
IPv4Network('192.0.3.0/24')
732
>>> IPv4Network('192.0.2.0/24').next_network(next_prefix=25)
0 commit comments