-
-
Notifications
You must be signed in to change notification settings - Fork 32.2k
gh-102105 Fix wording in filterfalse/quantify/filter #102189
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No, |
||
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" | ||
rhettinger marked this conversation as resolved.
Show resolved
Hide resolved
|
||
return sum(map(pred, iterable)) | ||
|
||
def ncycles(iterable, n): | ||
|
Uh oh!
There was an error while loading. Please reload this page.