The doc of `itertools.filterfalse()` shows `predicate` argument but the docstring shows `function` argument
@rhettinger がすでに取り組んでいます。
2025年8月28日 から。
- 主要言語
- Python
- スター
- 77.2k
- フォーク
- 35.9k
- PR マージ指標
- PR 指標を取得中
説明
The doc of itertools.filterfalse() shows predicate argument as shown below:
itertools.filterfalse(predicate, iterable)
But the docstring of itertools.filterfalse() shows function argument instead of predicate argument as shown below:
from itertools import filterfalse
print(help(filterfalse))
# class filterfalse(builtins.object)
# | filterfalse(function, iterable, /)
# ...
So the docstring of itertools.filterfalse() should show predicate argument instead of function argument for consistency as shown below:
from itertools import filterfalse
print(help(filterfalse))
# class filterfalse(builtins.object)
# | filterfalse(predicate, iterable, /)
# ...
In addition, both the doc and docstring of itertools.takewhile() properly show predicate argument as shown below:
itertools.takewhile(predicate, iterable)
from itertools import takewhile
print(help(takewhile))
# class takewhile(builtins.object)
# | takewhile(predicate, iterable, /)
# ...
And, both the doc and docstring of itertools.dropwhile() properly show predicate argument as shown below:
itertools.dropwhile(predicate, iterable)
from itertools import dropwhile
print(help(dropwhile))
# class dropwhile(builtins.object)
# | dropwhile(predicate, iterable, /)
# ...
Linked PRs
- gh-144451
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
評価
この issue はまだ評価されていません。