[Python-checkins] cpython (merge 3.2 -> 3.3): #16478: merge with 3.2.

ezio.melotti python-checkins at python.org
Fri Nov 16 12:18:13 CET 2012


http://hg.python.org/cpython/rev/d7558e4015a4
changeset:   80453:d7558e4015a4
branch:      3.3
parent:      80444:c574ce78cd61
parent:      80452:fc17fdd42c66
user:        Ezio Melotti <ezio.melotti at gmail.com>
date:        Fri Nov 16 13:17:42 2012 +0200
summary:
  #16478: merge with 3.2.

files:
  Lib/tabnanny.py |  16 ++++++++--------
  1 files changed, 8 insertions(+), 8 deletions(-)


diff --git a/Lib/tabnanny.py b/Lib/tabnanny.py
--- a/Lib/tabnanny.py
+++ b/Lib/tabnanny.py
@@ -188,21 +188,21 @@
         # count, il = self.norm
         # for i in range(len(count)):
         #    if count[i]:
-        #        il = il + (i/tabsize + 1)*tabsize * count[i]
+        #        il = il + (i//tabsize + 1)*tabsize * count[i]
         # return il
 
         # quicker:
-        # il = trailing + sum (i/ts + 1)*ts*count[i] =
-        # trailing + ts * sum (i/ts + 1)*count[i] =
-        # trailing + ts * sum i/ts*count[i] + count[i] =
-        # trailing + ts * [(sum i/ts*count[i]) + (sum count[i])] =
-        # trailing + ts * [(sum i/ts*count[i]) + num_tabs]
-        # and note that i/ts*count[i] is 0 when i < ts
+        # il = trailing + sum (i//ts + 1)*ts*count[i] =
+        # trailing + ts * sum (i//ts + 1)*count[i] =
+        # trailing + ts * sum i//ts*count[i] + count[i] =
+        # trailing + ts * [(sum i//ts*count[i]) + (sum count[i])] =
+        # trailing + ts * [(sum i//ts*count[i]) + num_tabs]
+        # and note that i//ts*count[i] is 0 when i < ts
 
         count, trailing = self.norm
         il = 0
         for i in range(tabsize, len(count)):
-            il = il + i/tabsize * count[i]
+            il = il + i//tabsize * count[i]
         return trailing + tabsize * (il + self.nt)
 
     # return true iff self.indent_level(t) == other.indent_level(t)

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list