Kaydet (Commit) 9c3f5031 authored tarafından 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.
üst a28cf6fe
......@@ -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.
......
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