File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -622,7 +622,7 @@ are always available. They are listed here in alphabetical order.
622
622
.. function :: filter(function, iterable)
623
623
624
624
Construct an iterator from those elements of *iterable * for which *function *
625
- returns true. *iterable * may be either a sequence, a container which
625
+ is true. *iterable * may be either a sequence, a container which
626
626
supports iteration, or an iterator. If *function * is ``None ``, the identity
627
627
function is assumed, that is, all elements of *iterable * that are false are
628
628
removed.
@@ -633,7 +633,7 @@ are always available. They are listed here in alphabetical order.
633
633
``None ``.
634
634
635
635
See :func: `itertools.filterfalse ` for the complementary function that returns
636
- elements of *iterable * for which *function * returns false.
636
+ elements of *iterable * for which *function * is false.
637
637
638
638
639
639
.. class :: float(x=0.0)
Original file line number Diff line number Diff line change @@ -359,7 +359,7 @@ loops that truncate the stream.
359
359
.. function :: filterfalse(predicate, iterable)
360
360
361
361
Make an iterator that filters elements from iterable returning only those for
362
- which the predicate is `` False `` . If *predicate * is ``None ``, return the items
362
+ which the predicate is false . If *predicate * is ``None ``, return the items
363
363
that are false. Roughly equivalent to::
364
364
365
365
def filterfalse(predicate, iterable):
@@ -792,7 +792,7 @@ which incur interpreter overhead.
792
792
return next(g, True) and not next(g, False)
793
793
794
794
def quantify(iterable, pred=bool):
795
- "Count how many times the predicate is true "
795
+ "Count how many times the predicate is True "
796
796
return sum(map(pred, iterable))
797
797
798
798
def ncycles(iterable, n):
You can’t perform that action at this time.
0 commit comments