[Python-checkins] r60772 - python/trunk/Lib/numbers.py

raymond.hettinger python-checkins at python.org
Thu Feb 14 02:08:03 CET 2008


Author: raymond.hettinger
Date: Thu Feb 14 02:08:02 2008
New Revision: 60772

Modified:
   python/trunk/Lib/numbers.py
Log:
Update notes on Decimal.



Modified: python/trunk/Lib/numbers.py
==============================================================================
--- python/trunk/Lib/numbers.py	(original)
+++ python/trunk/Lib/numbers.py	Thu Feb 14 02:08:02 2008
@@ -49,9 +49,11 @@
 # 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 @@
         return +self
 
 Real.register(float)
-# Real.register(decimal.Decimal)
 
 
 class Rational(Real, Exact):


More information about the Python-checkins mailing list