summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJan Kaliszewski <zuo@kaliszewski.net>2024-06-05 21:52:40 (GMT)
committerGitHub <noreply@github.com>2024-06-05 21:52:40 (GMT)
commitf878d46e5614f08a9302fcb6fc611ef49e9acf2f (patch)
tree35aae62bc04b71f7c1ae88290c4faaacf349c325
parente83ce850f433fd8bbf8ff4e8d7649b942639db31 (diff)
downloadcpython-f878d46e5614f08a9302fcb6fc611ef49e9acf2f.zip
cpython-f878d46e5614f08a9302fcb6fc611ef49e9acf2f.tar.gz
cpython-f878d46e5614f08a9302fcb6fc611ef49e9acf2f.tar.bz2
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*).
-rw-r--r--Doc/library/ipaddress.rst2
-rw-r--r--Lib/ipaddress.py2
2 files changed, 2 insertions, 2 deletions
diff --git a/Doc/library/ipaddress.rst b/Doc/library/ipaddress.rst
index ead841b..f58c0ea 100644
--- a/Doc/library/ipaddress.rst
+++ b/Doc/library/ipaddress.rst
@@ -990,7 +990,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 8e4d49c..9cef275 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.