python / python/cpython

The doc of `itertools.filterfalse()` shows `predicate` argument but the docstring shows `function` argument

Aberta
#138,186 5 comentários 0 reações 1 responsável Ver no GitHub

@rhettinger já está trabalhando nisso.

Desde 28/8/2025.

docs
Linguagem predominante
Python
Estrelas
77.2k
Forks
35.9k
Métricas de merge de PRs
Métricas de PR pendentes

Descrição

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

Guia de contribuição

Abrir o guia de contribuição

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Avaliação

Esta issue ainda não foi avaliada.

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.