Open MartinThoma opened 2 years ago
A code smell I see sometimes is enumeration of variables where an iterable should be used, e.g. a list.
Using a list has several advantages:
# Bad foo1 = "bar" foo2 = "baz" foo3 = "42" foo4 = "1337" # Good foo = ["bar", "baz", "42", "1337"]
Just looking for a number in the end would have a quite high chance of false-positivies, e.g.:
x1
x2
x3
ieee754
Hence I would look for variables where the direct siblings are 1-4 (or more)
Explanation
A code smell I see sometimes is enumeration of variables where an iterable should be used, e.g. a list.
Using a list has several advantages:
Example
False-Positives
Just looking for a number in the end would have a quite high chance of false-positivies, e.g.:
x1
,x2
,x3
is not too uncommon.ieee754
Hence I would look for variables where the direct siblings are 1-4 (or more)