commit | 447dc1565826c879faf544cda4bdd62546545166 | [log] [tgz] |
---|---|---|
author | Benjamin Peterson <benjamin@python.org> | Thu Oct 15 01:49:37 2009 +0000 |
committer | Benjamin Peterson <benjamin@python.org> | Thu Oct 15 01:49:37 2009 +0000 |
tree | 997fbd5b448d05eabb1d16617bce73dcae6e2922 | |
parent | e537adfd080ffe57e9f202a931cf70e22213e8a4 [diff] [blame] |
use floor division and add a test that exercises the tabsize codepath
diff --git a/Lib/tokenize.py b/Lib/tokenize.py index ad3cf9d..686ad66 100644 --- a/Lib/tokenize.py +++ b/Lib/tokenize.py
@@ -319,7 +319,7 @@ if line[pos] == ' ': column = column + 1 elif line[pos] == '\t': - column = (column/tabsize + 1)*tabsize + column = (column//tabsize + 1)*tabsize elif line[pos] == '\f': column = 0 else: