]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
It's merge time!
authorMichael W. Hudson <mwh@python.net>
Mon, 28 Jan 2002 15:10:52 +0000 (15:10 +0000)
committerMichael W. Hudson <mwh@python.net>
Mon, 28 Jan 2002 15:10:52 +0000 (15:10 +0000)
Tim sez "Bugfix candidate:  the current state of AutoIdent.py
should be in 2.2.1."

Tools/idle/AutoIndent.py

index 66a0aec9b87806916d707cd3c70e6a5770e29b5b..f8bb847b2f59f72b396e7b8abb68c48b82111897 100644 (file)
@@ -171,7 +171,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]
@@ -495,7 +495,7 @@ def classifyws(s, tabwidth):
             effective = effective + 1
         elif ch == '\t':
             raw = raw + 1
-            effective = (effective / tabwidth + 1) * tabwidth
+            effective = (effective // tabwidth + 1) * tabwidth
         else:
             break
     return raw, effective