diff options
author | Raymond Hettinger <python@rcn.com> | 2008-02-14 01:08:02 (GMT) |
---|---|---|
committer | Raymond Hettinger <python@rcn.com> | 2008-02-14 01:08:02 (GMT) |
commit | ddb164a6512947ecce6923aac95488c40173041e (patch) | |
tree | a6b42a9c11c97aa6a9d7565150876bb13b3e168d /Lib | |
parent | ac45aff2f187a47e25ffa06a7560889055ad8717 (diff) | |
download | cpython-ddb164a6512947ecce6923aac95488c40173041e.zip cpython-ddb164a6512947ecce6923aac95488c40173041e.tar.gz cpython-ddb164a6512947ecce6923aac95488c40173041e.tar.bz2 |
Update notes on Decimal.
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/numbers.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/Lib/numbers.py b/Lib/numbers.py index b8a5c36..b6de8ac 100644 --- a/Lib/numbers.py +++ b/Lib/numbers.py @@ -49,9 +49,11 @@ Inexact.register(float) # Inexact.register(decimal.Decimal) -## Notes on Decimal and it how relates to the numeric tower -## -------------------------------------------------------- -## Decimal is Real except that it does not support rich comparisons. +## Notes on Decimal +## ---------------- +## Decimal has all of the methods specified by the Real abc, but it should +## not be registered as a Real because decimals do not interoperate with +## binary floats. ## ## Decimal has some of the characteristics of Integrals. It provides ## logical operations but not as operators. The logical operations only apply @@ -305,7 +307,6 @@ class Real(Complex): return +self Real.register(float) -# Real.register(decimal.Decimal) class Rational(Real, Exact): |