summaryrefslogtreecommitdiffstats
path: root/Lib/decimal.py
diff options
context:
space:
mode:
authorMark Dickinson <mdickinson@enthought.com>2012-10-31 17:53:27 (GMT)
committerMark Dickinson <mdickinson@enthought.com>2012-10-31 17:53:27 (GMT)
commit9c3f5031a9c3e0557cf28e72fa1f74f23b9144f6 (patch)
tree4fa1507201b72028a2580935e3bf5cb9d0bd2861 /Lib/decimal.py
parenta28cf6fef927dce1d7ab21c322a959b835674e78 (diff)
downloadcpython-9c3f5031a9c3e0557cf28e72fa1f74f23b9144f6.zip
cpython-9c3f5031a9c3e0557cf28e72fa1f74f23b9144f6.tar.gz
cpython-9c3f5031a9c3e0557cf28e72fa1f74f23b9144f6.tar.bz2
Issue #13701: Fix decorator avoidance (due to desire for Python 2.3 compatibility) in decimal module.
Diffstat (limited to 'Lib/decimal.py')
-rw-r--r--Lib/decimal.py4
1 files changed, 1 insertions, 3 deletions
diff --git a/Lib/decimal.py b/Lib/decimal.py
index b74ab01..bb0c96e 100644
--- a/Lib/decimal.py
+++ b/Lib/decimal.py
@@ -703,8 +703,7 @@ class Decimal(object):
raise TypeError("Cannot convert %r to Decimal" % value)
- # @classmethod, but @decorator is not valid Python 2.3 syntax, so
- # don't use it (see notes on Py2.3 compatibility at top of file)
+ @classmethod
def from_float(cls, f):
"""Converts a float to a decimal number, exactly.
@@ -743,7 +742,6 @@ class Decimal(object):
return result
else:
return cls(result)
- from_float = classmethod(from_float)
def _isnan(self):
"""Returns whether the number is not actually one.