didn't pyflake (or equivalent) catch the simple error of having a duplicate `result = []` line?