]> granicus.if.org Git - python/commitdiff
classifyws(): Fix a "/" to work under -Qnew (as well as without it).
authorTim Peters <tim.peters@gmail.com>
Wed, 23 Jan 2002 05:02:20 +0000 (05:02 +0000)
committerTim Peters <tim.peters@gmail.com>
Wed, 23 Jan 2002 05:02:20 +0000 (05:02 +0000)
Bugfix candidate!

Tools/idle/AutoIndent.py

index 66a0aec9b87806916d707cd3c70e6a5770e29b5b..87f75c12ee423129f2d6a6a32bbd9191d19e62eb 100644 (file)
@@ -495,7 +495,7 @@ def classifyws(s, tabwidth):
             effective = effective + 1
         elif ch == '\t':
             raw = raw + 1
-            effective = (effective / tabwidth + 1) * tabwidth
+            effective = (int(effective / tabwidth) + 1) * tabwidth
         else:
             break
     return raw, effective