diff options
author | Guido van Rossum <guido@python.org> | 2007-12-10 20:04:04 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 2007-12-10 20:04:04 (GMT) |
commit | a13f4a11294934fca3311809b1c8ec91dc1e6d52 (patch) | |
tree | 0227caba385989042d4cf99c9824c1613726d6f2 /Lib/decimal.py | |
parent | 968e68dc7119734a52d620833059b63cddbae8ad (diff) | |
download | cpython-a13f4a11294934fca3311809b1c8ec91dc1e6d52.zip cpython-a13f4a11294934fca3311809b1c8ec91dc1e6d52.tar.gz cpython-a13f4a11294934fca3311809b1c8ec91dc1e6d52.tar.bz2 |
Make Decimal a subclass of Real and Inexact.
Diffstat (limited to 'Lib/decimal.py')
-rw-r--r-- | Lib/decimal.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/decimal.py b/Lib/decimal.py index 7f95768..ba335bb 100644 --- a/Lib/decimal.py +++ b/Lib/decimal.py @@ -134,6 +134,7 @@ __all__ = [ 'setcontext', 'getcontext', 'localcontext' ] +import numbers as _numbers import copy as _copy # Rounding @@ -509,7 +510,7 @@ def localcontext(ctx=None): ##### Decimal class ####################################################### -class Decimal(object): +class Decimal(_numbers.Real, _numbers.Inexact): """Floating point class for decimal arithmetic.""" __slots__ = ('_exp','_int','_sign', '_is_special') |