mirror of https://github.com/python/cpython
gh-120128: fix description of argument to ipaddress.collapse_addresses() (#120131)
The argument to collapse_addresses() is now described as an *iterable* (rather than *iterator*).
This commit is contained in:
parent
e83ce850f4
commit
f878d46e56
|
@ -990,7 +990,7 @@ The module also provides the following module level functions:
|
||||||
.. function:: collapse_addresses(addresses)
|
.. function:: collapse_addresses(addresses)
|
||||||
|
|
||||||
Return an iterator of the collapsed :class:`IPv4Network` or
|
Return an iterator of the collapsed :class:`IPv4Network` or
|
||||||
:class:`IPv6Network` objects. *addresses* is an iterator of
|
:class:`IPv6Network` objects. *addresses* is an :term:`iterable` of
|
||||||
:class:`IPv4Network` or :class:`IPv6Network` objects. A :exc:`TypeError` is
|
:class:`IPv4Network` or :class:`IPv6Network` objects. A :exc:`TypeError` is
|
||||||
raised if *addresses* contains mixed version objects.
|
raised if *addresses* contains mixed version objects.
|
||||||
|
|
||||||
|
|
|
@ -310,7 +310,7 @@ def collapse_addresses(addresses):
|
||||||
[IPv4Network('192.0.2.0/24')]
|
[IPv4Network('192.0.2.0/24')]
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
addresses: An iterator of IPv4Network or IPv6Network objects.
|
addresses: An iterable of IPv4Network or IPv6Network objects.
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
An iterator of the collapsed IPv(4|6)Network objects.
|
An iterator of the collapsed IPv(4|6)Network objects.
|
||||||
|
|
Loading…
Reference in New Issue