pylint #21861 algorithmic warnings, warn when doing "x in list" several times [open]
If one does "if x in l" where l is a list several times, it is much more efficient, especially for big lists, to first convert to a set(). | |
priority | normal |
---|---|
type | bug |
done in | <not specified> |
closed by | <not specified> |
Comments
-
2011/08/01 14:12, written by anon
add commentConverting to a tuple might be a good idea, but not to a set: it would lose order and duplicate elements. —merwok