slightly more pythonic syntax for iterating over line numbers
Merge pull request #1700 from esc/feature/syntax_fix

slightly more pythonic syntax for iterating over line numbers