Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 8cf2704

Browse files
author
Steven M. Gava
committed
staying current with python idle fixes
1 parent 8b0ee24 commit 8cf2704

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

Lib/idlelib/AutoIndent.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ def smart_backspace_event(self, event):
138138
expand, tabwidth = string.expandtabs, self.tabwidth
139139
have = len(expand(chars, tabwidth))
140140
assert have > 0
141-
want = int((have - 1) / self.indentwidth) * self.indentwidth
141+
want = ((have - 1) // self.indentwidth) * self.indentwidth
142142
ncharsdeleted = 0
143143
while 1:
144144
chars = chars[:-1]
@@ -462,7 +462,7 @@ def classifyws(s, tabwidth):
462462
effective = effective + 1
463463
elif ch == '\t':
464464
raw = raw + 1
465-
effective = (int(effective / tabwidth) + 1) * tabwidth
465+
effective = (effective // tabwidth + 1) * tabwidth
466466
else:
467467
break
468468
return raw, effective

0 commit comments

Comments
 (0)