Skip to content

ipaddress: argument to collapse_addresses() should be described as iterable #120128

Closed
@zuo

Description

@zuo

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.

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    docsDocumentation in the Doc dir

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions