Commit 030bc54a authored by Mark Dickinson's avatar Mark Dickinson

Issue #13701: Fix decorator avoidance (due to desire for Python 2.3...

Issue #13701: Fix decorator avoidance (due to desire for Python 2.3 compatibility) in decimal module.
parent ce2d27b3
...@@ -703,8 +703,7 @@ class Decimal(object): ...@@ -703,8 +703,7 @@ class Decimal(object):
raise TypeError("Cannot convert %r to Decimal" % value) raise TypeError("Cannot convert %r to Decimal" % value)
# @classmethod, but @decorator is not valid Python 2.3 syntax, so @classmethod
# don't use it (see notes on Py2.3 compatibility at top of file)
def from_float(cls, f): def from_float(cls, f):
"""Converts a float to a decimal number, exactly. """Converts a float to a decimal number, exactly.
...@@ -743,7 +742,6 @@ class Decimal(object): ...@@ -743,7 +742,6 @@ class Decimal(object):
return result return result
else: else:
return cls(result) return cls(result)
from_float = classmethod(from_float)
def _isnan(self): def _isnan(self):
"""Returns whether the number is not actually one. """Returns whether the number is not actually one.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment