]> granicus.if.org Git - python/commitdiff
Remove broken __round__, __ceil__ and __floor__ from Decimal
authorMark Dickinson <dickinsm@gmail.com>
Sat, 3 May 2008 19:59:07 +0000 (19:59 +0000)
committerMark Dickinson <dickinsm@gmail.com>
Sat, 3 May 2008 19:59:07 +0000 (19:59 +0000)
Lib/decimal.py

index a2e7fa409272d5ba322257587f4dafa1174a5758..96d4b3e61a06b1c480d38ef495546f33eab80d0d 100644 (file)
@@ -1649,9 +1649,6 @@ class Decimal(_numbers.Real):
         else:
             return -1
 
-    def __round__(self):
-        return self._round_down(0)
-
     def _round_up(self, prec):
         """Rounds away from 0."""
         return -self._round_down(prec)
@@ -1687,9 +1684,6 @@ class Decimal(_numbers.Real):
         else:
             return -self._round_down(prec)
 
-    def __ceil__(self):
-        return self._round_ceiling(0)
-
     def _round_floor(self, prec):
         """Rounds down (not towards 0 if negative)"""
         if not self._sign:
@@ -1697,9 +1691,6 @@ class Decimal(_numbers.Real):
         else:
             return -self._round_down(prec)
 
-    def __floor__(self):
-        return self._round_floor(0)
-
     def _round_05up(self, prec):
         """Round down unless digit prec-1 is 0 or 5."""
         if prec and self._int[prec-1] not in '05':