]> granicus.if.org Git - python/commitdiff
Use floor division operator instead of deprecated division operator.
authorRaymond Hettinger <python@rcn.com>
Tue, 12 Apr 2011 00:45:01 +0000 (17:45 -0700)
committerRaymond Hettinger <python@rcn.com>
Tue, 12 Apr 2011 00:45:01 +0000 (17:45 -0700)
Lib/trace.py

index 97491db413e8daa225c9f3c15ecaec9ada67a727..6e15e8b4bd866a09f27bdd7a38c4dce628f3e306 100644 (file)
@@ -335,7 +335,7 @@ class CoverageResults:
                                                       lnotab, count)
 
             if summary and n_lines:
-                percent = int(100 * n_hits / n_lines)
+                percent = 100 * n_hits // n_lines
                 sums[modulename] = n_lines, percent, modulename, filename
 
         if summary and sums: