Skip to content

Commit 28f195c

Browse files
committed
Fix the Docstring. Remove unnecessary doctest directive, and add a note on ValueError Exception raised.
1 parent 3479737 commit 28f195c

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

Doc/library/ipaddress.rst

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -721,9 +721,12 @@ dictionaries.
721721
.. method:: next_network(next_prefix=None)
722722

723723
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
724+
*next_prefix=None*, then the current network prefix will be used.
725725
Returns a single network object.
726726

727+
Raises :exc:`ValueError` if *next_prefix* is out of range or no further
728+
network of the requested size exists.
729+
727730
>>> IPv4Network('192.0.2.0/24').next_network()
728731
IPv4Network('192.0.3.0/24')
729732
>>> IPv4Network('192.0.2.0/24').next_network(next_prefix=25)

0 commit comments

Comments
 (0)