[Checkins] SVN: z3c.batching/trunk/src/z3c/batching/batch.py Use explicit integer floor division.

Albertas Agejevas cvs-admin at zope.org
Mon Feb 25 12:02:07 UTC 2013


Log message for revision 129780:
  Use explicit integer floor division.
  

Changed:
  U   z3c.batching/trunk/src/z3c/batching/batch.py

-=-
Modified: z3c.batching/trunk/src/z3c/batching/batch.py
===================================================================
--- z3c.batching/trunk/src/z3c/batching/batch.py	2013-02-25 11:58:14 UTC (rev 129779)
+++ z3c.batching/trunk/src/z3c/batching/batch.py	2013-02-25 12:02:06 UTC (rev 129780)
@@ -67,7 +67,7 @@
 
     @property
     def index(self):
-        return self.start / self.size
+        return self.start // self.size
 
     @property
     def number(self):
@@ -77,7 +77,7 @@
     @property
     def total(self):
         """See interfaces.IBatch"""
-        total = self._length / self.size
+        total = self._length // self.size
         if self._length % self.size:
             total += 1
         return total



More information about the checkins mailing list