Description
Documentation
In the description of the `ipaddress.collapse_addresses() function, we can read that:
addresses is an iterator of IPv4Network or IPv6Network objects.
Whereas, in fact, addresses can be any iterable object (not necessarily an iterator).
Therefore, I propose to change that fragment to:
addresses is an iterable of IPv4Network or IPv6Network objects.
...and, also, to fix the related fragment of the function's docstring – by replacing: addresses: An iterator of IPv4Network or IPv6Network objects.
with addresses: An iterable of IPv4Network or IPv6Network objects.
[Edit] PS Please note that even the already existing example in the docs (below the function's description) sets the addresses argument to an iterable (namely: a list), rather than an iterator.