Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork34k
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
Conversation
… 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>
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 the |
picnixz left a comment
There was a problem hiding this 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).
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 phrase |
picnixz commentedFeb 4, 2026
Since we still haven't reached a consensus on the issue, I'm closing it for now. |
Uh oh!
There was an error while loading.Please reload this page.
Summary
itertools.filterfalse's docstring fromfunctiontopredicateDoc/library/itertools.rst) which already usespredicatedropwhileandtakewhilewhich usepredicateBefore:
After:
Test plan
make checkpassed🤖 Generated withClaude Code
itertools.filterfalse()showspredicateargument but the docstring showsfunctionargument #138186