]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.12] gh-120128: fix description of argument to ipaddress.collapse_addresses() ...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Sat, 15 Jun 2024 12:12:45 +0000 (14:12 +0200)
committerGitHub <noreply@github.com>
Sat, 15 Jun 2024 12:12:45 +0000 (06:12 -0600)
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 <zuo@kaliszewski.net>
Doc/library/ipaddress.rst
Lib/ipaddress.py

index d359451b397807c940dae4993ff7420228eb039d..74ad25464d88c50b1fc0759565878e52b2308469 100644 (file)
@@ -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.
 
index d8f3b5e2e9e510fe57c8938bd19809ad300650f7..816fbcd2bc4d4334bc42b0f7d96a6ac9320f45d4 100644 (file)
@@ -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.