[Python-checkins] r75427 - sandbox/trunk/2to3/lib2to3/pgen2/tokenize.py
benjamin.peterson
python-checkins at python.org
Thu Oct 15 03:35:57 CEST 2009
Author: benjamin.peterson
Date: Thu Oct 15 03:35:57 2009
New Revision: 75427
Log:
force floor division
Modified:
sandbox/trunk/2to3/lib2to3/pgen2/tokenize.py
Modified: sandbox/trunk/2to3/lib2to3/pgen2/tokenize.py
==============================================================================
--- sandbox/trunk/2to3/lib2to3/pgen2/tokenize.py (original)
+++ sandbox/trunk/2to3/lib2to3/pgen2/tokenize.py Thu Oct 15 03:35:57 2009
@@ -384,7 +384,7 @@
column = 0
while pos < max: # measure leading whitespace
if line[pos] == ' ': column = column + 1
- elif line[pos] == '\t': column = (column/tabsize + 1)*tabsize
+ elif line[pos] == '\t': column = (column//tabsize + 1)*tabsize
elif line[pos] == '\f': column = 0
else: break
pos = pos + 1
More information about the Python-checkins
mailing list