mirror of
https://github.com/python/cpython.git
synced 2025-08-03 00:23:06 +00:00
use floor division and add a test that exercises the tabsize codepath
This commit is contained in:
parent
e537adfd08
commit
447dc15658
2 changed files with 18 additions and 1 deletions
|
@ -319,7 +319,7 @@ def generate_tokens(readline):
|
|||
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:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue