summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
Diffstat (limited to 'Lib')
-rw-r--r--Lib/ipaddress.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/Lib/ipaddress.py b/Lib/ipaddress.py
index 22efb09..532e44e 100644
--- a/Lib/ipaddress.py
+++ b/Lib/ipaddress.py
@@ -206,10 +206,11 @@ def summarize_address_range(first, last):
"""Summarize a network range given the first and last IP addresses.
Example:
- >>> summarize_address_range(IPv4Address('192.0.2.0'),
- IPv4Address('192.0.2.130'))
+ >>> list(summarize_address_range(IPv4Address('192.0.2.0'),
+ ... IPv4Address('192.0.2.130')))
+ ... #doctest: +NORMALIZE_WHITESPACE
[IPv4Network('192.0.2.0/25'), IPv4Network('192.0.2.128/31'),
- IPv4Network('192.0.2.130/32')]
+ IPv4Network('192.0.2.130/32')]
Args:
first: the first IPv4Address or IPv6Address in the range.