Skip to content

Commit 618908d

Browse files
kovanclaude
andcommitted
gh-138186: Use 'predicate' instead of 'function' in filterfalse docstring
Change the parameter name in itertools.filterfalse's docstring from 'function' to 'predicate' for consistency with the RST documentation and with similar functions dropwhile and takewhile. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 7e2c9bd commit 618908d

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

Modules/clinic/itertoolsmodule.c.h

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Modules/itertoolsmodule.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3245,17 +3245,17 @@ typedef struct {
32453245
/*[clinic input]
32463246
@classmethod
32473247
itertools.filterfalse.__new__
3248-
function as func: object
3248+
predicate as func: object
32493249
iterable as seq: object
32503250
/
3251-
Return those items of iterable for which function(item) is false.
3251+
Return those items of iterable for which predicate(item) is false.
32523252
3253-
If function is None, return the items that are false.
3253+
If predicate is None, return the items that are false.
32543254
[clinic start generated code]*/
32553255

32563256
static PyObject *
32573257
itertools_filterfalse_impl(PyTypeObject *type, PyObject *func, PyObject *seq)
3258-
/*[clinic end generated code: output=55f87eab9fc0484e input=2d684a2c66f99cde]*/
3258+
/*[clinic end generated code: output=55f87eab9fc0484e input=a7df36679f5f66d6]*/
32593259
{
32603260
PyObject *it;
32613261
filterfalseobject *lz;

0 commit comments

Comments
 (0)