mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
Issue #15888: fixing problems in ipaddress doctests. Patch by Chris Jerdonek
This commit is contained in:
parent
f4c2757d78
commit
948af23a77
3 changed files with 34 additions and 21 deletions
|
@ -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.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue