]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
fix for python2.2 -Qnew division error,
authorSteven M. Gava <elguavas@python.net>
Wed, 23 Jan 2002 05:15:17 +0000 (05:15 +0000)
committerSteven M. Gava <elguavas@python.net>
Wed, 23 Jan 2002 05:15:17 +0000 (05:15 +0000)
thanks Tim!

Lib/idlelib/AutoIndent.py

index eff398b527025cdc6a19ac0a1fa2fc7304f642f0..4fbbedf4e0474f4809f530319f51c3e3a6600d1f 100644 (file)
@@ -462,7 +462,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