Enhancement: Add a [consider-using-generator]-checker in any or all calls #3165
Labels
Enhancement ✨
Improvement to a component
Good first issue
Friendly and approachable by new contributors
Milestone
Problem:
There are many cases of comprehensions inside of
any
orall
calls that are unnecessary and should be replaced by a generator.For example:
Instead, a generator would be less code, and way faster:
Speed comparisons:
any
andall
are functions that profit from that because the loop is breaking and can short cut; the remaining elements are not even looped over if the test returns aTrue
in theany
function or aFalse
in theall
function.The text was updated successfully, but these errors were encountered: