The doc of `itertools.filterfalse()` shows `predicate` argument but the docstring shows `function` argument
@rhettinger ya está trabajando en esto.
Desde el 28/8/2025.
- Lenguaje dominante
- Python
- Estrellas
- 77.2k
- Forks
- 36k
- Métricas de merge de PR
- Métricas de PR pendientes
Descripción
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
Guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Evaluación
Este issue todavía no se ha evaluado.