https://github.com/python/cpython/commit/4fb2af31959bdb6a5d0df67ba20a96378f27578a commit: 4fb2af31959bdb6a5d0df67ba20a96378f27578a branch: 3.12 author: Miss Islington (bot) <[email protected]> committer: hugovk <[email protected]> date: 2024-06-15T06:12:45-06:00 summary:
[3.12] gh-120128: fix description of argument to ipaddress.collapse_addresses() (GH-120131) (#120136) gh-120128: fix description of argument to ipaddress.collapse_addresses() (GH-120131) The argument to collapse_addresses() is now described as an *iterable* (rather than *iterator*). (cherry picked from commit f878d46e5614f08a9302fcb6fc611ef49e9acf2f) Co-authored-by: Jan Kaliszewski <[email protected]> files: M Doc/library/ipaddress.rst M Lib/ipaddress.py diff --git a/Doc/library/ipaddress.rst b/Doc/library/ipaddress.rst index d359451b397807..74ad25464d88c5 100644 --- a/Doc/library/ipaddress.rst +++ b/Doc/library/ipaddress.rst @@ -983,7 +983,7 @@ The module also provides the following module level functions: .. function:: collapse_addresses(addresses) 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 raised if *addresses* contains mixed version objects. diff --git a/Lib/ipaddress.py b/Lib/ipaddress.py index d8f3b5e2e9e510..816fbcd2bc4d43 100644 --- a/Lib/ipaddress.py +++ b/Lib/ipaddress.py @@ -310,7 +310,7 @@ def collapse_addresses(addresses): [IPv4Network('192.0.2.0/24')] Args: - addresses: An iterator of IPv4Network or IPv6Network objects. + addresses: An iterable of IPv4Network or IPv6Network objects. Returns: An iterator of the collapsed IPv(4|6)Network objects. _______________________________________________ Python-checkins mailing list -- [email protected] To unsubscribe send an email to [email protected] https://mail.python.org/mailman3/lists/python-checkins.python.org/ Member address: [email protected]
