gh-102105 Fix wording in filterfalse/quantify/filter (GH-102189)

This commit is contained in:
Stefan Pochmann 2023-02-24 17:13:05 +01:00 committed by GitHub
parent e5e1c1fabd
commit 81bf10e4f2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View file

@ -398,7 +398,7 @@ loops that truncate the stream.
.. function:: filterfalse(predicate, iterable)
Make an iterator that filters elements from iterable returning only those for
which the predicate is ``False``. If *predicate* is ``None``, return the items
which the predicate is false. If *predicate* is ``None``, return the items
that are false. Roughly equivalent to::
def filterfalse(predicate, iterable):
@ -831,7 +831,7 @@ which incur interpreter overhead.
return next(g, True) and not next(g, False)
def quantify(iterable, pred=bool):
"Count how many times the predicate is true"
"Count how many times the predicate is True"
return sum(map(pred, iterable))
def ncycles(iterable, n):