summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Dickinson <dickinsm@gmail.com>2008-05-03 19:59:07 (GMT)
committerMark Dickinson <dickinsm@gmail.com>2008-05-03 19:59:07 (GMT)
commit40360f2a3cea79220ff6f6fa21f46e3e4835ddcd (patch)
tree1170aa9dd2cdd59317d1c4c820b29cf47418e7eb
parent227e7f5e26be23b5df646a999dd06a9bcd7eba9a (diff)
downloadcpython-40360f2a3cea79220ff6f6fa21f46e3e4835ddcd.zip
cpython-40360f2a3cea79220ff6f6fa21f46e3e4835ddcd.tar.gz
cpython-40360f2a3cea79220ff6f6fa21f46e3e4835ddcd.tar.bz2
Remove broken __round__, __ceil__ and __floor__ from Decimal
-rw-r--r--Lib/decimal.py9
1 files changed, 0 insertions, 9 deletions
diff --git a/Lib/decimal.py b/Lib/decimal.py
index a2e7fa4..96d4b3e 100644
--- a/Lib/decimal.py
+++ b/Lib/decimal.py
@@ -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':