Skip to content

help(set.issubset) does not tell the truth that it could accept any iterable as an argument #113560

@CharlieZhao95

Description

@CharlieZhao95

Documentation

The set docs tell us:

Note, the non-operator versions of union()intersection()difference()symmetric_difference()issubset(), and issuperset() methods will accept any iterable as an argument.

But the help(set.issubset) does not emphasize this. It only explains that it could test the inclusion relationship between two sets.

>>> help(set.issubset)
Help on method_descriptor:

issubset(...)
    Report whether another set contains this set.

# Actually, it could accept an iterable
>>> {'a'}.issubset('abc')
True

The same problem comes with the help(set.issuperset).

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