Consider splitting C419 for sum/min/max into its own rule #10838
Labels
breaking
Breaking API change
linter
Related to the linter
needs-decision
Awaiting a decision from a maintainer
As discussed in #3259 (comment), the performance impact of switching from comprehension to generator is different if you are passing to a short-circuiting function (e.g.
any
orall
) vs a non-short-circuiting one (sum
,min
,max
). Given these differing tradeoffs, it would be reasonable for a project to want to enable the lint for short-circuiting cases, and not the others. This suggests that we should split them into separate rules (or add a config option), as requested in #10759 (comment)The text was updated successfully, but these errors were encountered: