]> granicus.if.org Git - python/commitdiff
staying current with python idle fixes
authorSteven M. Gava <elguavas@python.net>
Wed, 23 Jan 2002 23:56:41 +0000 (23:56 +0000)
committerSteven M. Gava <elguavas@python.net>
Wed, 23 Jan 2002 23:56:41 +0000 (23:56 +0000)
Lib/idlelib/AutoIndent.py

index 4fbbedf4e0474f4809f530319f51c3e3a6600d1f..3432bf01361d453ec3601befd52c93d30056866b 100644 (file)
@@ -138,7 +138,7 @@ class AutoIndent:
         expand, tabwidth = string.expandtabs, self.tabwidth
         have = len(expand(chars, tabwidth))
         assert have > 0
-        want = int((have - 1) / self.indentwidth) * self.indentwidth
+        want = ((have - 1) // self.indentwidth) * self.indentwidth
         ncharsdeleted = 0
         while 1:
             chars = chars[:-1]
@@ -462,7 +462,7 @@ def classifyws(s, tabwidth):
             effective = effective + 1
         elif ch == '\t':
             raw = raw + 1
-            effective = (int(effective / tabwidth) + 1) * tabwidth
+            effective = (effective // tabwidth + 1) * tabwidth
         else:
             break
     return raw, effective