[Python-3000-checkins] r62669 - python/branches/py3k/Lib/decimal.py
mark.dickinson
python-3000-checkins at python.org
Sat May 3 21:59:07 CEST 2008
Author: mark.dickinson
Date: Sat May 3 21:59:07 2008
New Revision: 62669
Log:
Remove broken __round__, __ceil__ and __floor__ from Decimal
Modified:
python/branches/py3k/Lib/decimal.py
Modified: python/branches/py3k/Lib/decimal.py
==============================================================================
--- python/branches/py3k/Lib/decimal.py (original)
+++ python/branches/py3k/Lib/decimal.py Sat May 3 21:59:07 2008
@@ -1649,9 +1649,6 @@
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 @@
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 @@
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':
More information about the Python-3000-checkins
mailing list