]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Issue #13701: Fix decorator avoidance (due to desire for Python 2.3 compatibility...
authorMark Dickinson <mdickinson@enthought.com>
Wed, 31 Oct 2012 17:53:27 +0000 (17:53 +0000)
committerMark Dickinson <mdickinson@enthought.com>
Wed, 31 Oct 2012 17:53:27 +0000 (17:53 +0000)
Lib/decimal.py

index b74ab0134d904c6fc0876e0ddc0b9d1092e6a54d..bb0c96e75a10624c0da004ca51e48d542d0d2817 100644 (file)
@@ -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.