8000 `help(set.issubset)` does not tell the truth that it could accept any iterable as an argument · Issue #113560 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
CharlieZhao95 opened this issue Dec 29, 2023 · 0 comments
Labels
docs Documentation in the Doc dir

Comments

@CharlieZhao95
Copy link
Contributor
CharlieZhao95 commented Dec 29, 2023

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

@CharlieZhao95 CharlieZhao95 added the docs Documentation in the Doc dir label Dec 29, 2023
miss-islington pushed a commit to miss-islington/cpython that referenced this issue Jan 27, 2024
…rset() (pythonGH-113562)

(cherry picked from commit 11c5822)

Co-authored-by: Charlie Zhao <zhaoyu_hit@qq.com>
miss-islington pushed a commit to miss-islington/cpython that referenced this issue Jan 27, 2024
…rset() (pythonGH-113562)

(cherry picked from commit 11c5822)

Co-authored-by: Charlie Zhao <zhaoyu_hit@qq.com>
serhiy-storchaka pushed a commit that referenced this issue Jan 27, 2024
…erset() (GH-113562) (GH-114643)

(cherry picked from commit 11c5822)

Co-authored-by: Charlie Zhao <zhaoyu_hit@qq.com>
serhiy-storchaka pushed a commit that referenced this issue Jan 27, 2024
…erset() (GH-113562) (GH-114644)

(cherry picked from commit 11c5822)

Co-authored-by: Charlie Zhao <zhaoyu_hit@qq.com>
aisk pushed a commit to aisk/cpython that referenced this issue Feb 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation in the Doc dir
Projects
None yet
Development

No branches or pull requests

2 participants
0