Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

gh-138186: Use 'predicate' instead of 'function' in filterfalse docstring#144451

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Closed

Conversation

@kovan
Copy link
Contributor

@kovankovan commentedFeb 3, 2026
edited by bedevere-appbot
Loading

Summary

  • Changes the parameter name initertools.filterfalse's docstring fromfunction topredicate
  • This makes it consistent with:
    • The RST documentation (Doc/library/itertools.rst) which already usespredicate
    • The similar functionsdropwhile andtakewhile which usepredicate

Before:

>>> help(itertools.filterfalse)filterfalse(function, iterable, /)

After:

>>> help(itertools.filterfalse)filterfalse(predicate, iterable, /)

Test plan

  • make check passed

🤖 Generated withClaude Code

… docstringChange the parameter name in itertools.filterfalse's docstring from'function' to 'predicate' for consistency with the RST documentationand with similar functions dropwhile and takewhile.Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@bedevere-app
Copy link

Most changes to Pythonrequire a NEWS entry. Add one using theblurb_it web app or theblurb command-line tool.

If this change has little impact on Python users, wait for a maintainer to apply theskip news label instead.

Copy link
Member

@picnixzpicnixz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

It's not about dropwhile/takewhile, but about filter/filterfalse. See#138186 (comment). And again, read the issue before opening PRs. IMO, semantically, predicate is more correct but at runtime, we don't require the predicate to return a boolean as we use truthiness (predicates should really be boolean functions).

@bedevere-app
Copy link

A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated.

Once you have made the requested changes, please leave a comment on this pull request containing the phraseI have made the requested changes; please review again. I will then notify any core developers who have left a review that you're ready for them to take another look at this pull request.

@picnixz
Copy link
Member

Since we still haven't reached a consensus on the issue, I'm closing it for now.

@picnixzpicnixz closed thisFeb 4, 2026
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@picnixzpicnixzpicnixz requested changes

@rhettingerrhettingerAwaiting requested review from rhettingerrhettinger is a code owner

Assignees

No one assigned

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

2 participants

@kovan@picnixz

[8]ページ先頭

©2009-2026 Movatter.jp