[gnue] r9919 - trunk/gnue-reports/src/base

[email protected]
Newsgroups gmane.comp.cms.gnue.cvs
Message-ID <[email protected]>
Author: reinhard
Date: 2009-10-01 08:51:39 -0500 (Thu, 01 Oct 2009)
New Revision: 9919

Modified:
   trunk/gnue-reports/src/base/GRDataMapper.py
Log:
Added decimal.Decimal to list of possible numeric types, but only for
Python >= 2.4


Modified: trunk/gnue-reports/src/base/GRDataMapper.py
===================================================================
--- trunk/gnue-reports/src/base/GRDataMapper.py	2009-09-30 13:25:58 UTC (rev 9918)
+++ trunk/gnue-reports/src/base/GRDataMapper.py	2009-10-01 13:51:39 UTC (rev 9919)
@@ -35,6 +35,8 @@
 from gnue.common.external.fixedpoint import FixedPoint
 import types, string
 
+if sys.hexversion >= 0x02040000:
+    import decimal
 
 #
 # Class used internally by GRDataMapper
@@ -428,4 +430,6 @@
                     }
 
 # Python types that are numeric
-_numericTypes = (types.FloatType, types.IntType, types.LongType)
+_numericTypes = [types.FloatType, types.IntType, types.LongType]
+if sys.hexversion >= 0x02040000:
+    _numericTypes.append(decimal.Decimal)
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.