[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnue] r9194 - trunk/gnue-common/src/utils
From: |
reinhard |
Subject: |
[gnue] r9194 - trunk/gnue-common/src/utils |
Date: |
Wed, 3 Jan 2007 13:58:49 -0600 (CST) |
Author: reinhard
Date: 2007-01-03 13:58:48 -0600 (Wed, 03 Jan 2007)
New Revision: 9194
Modified:
trunk/gnue-common/src/utils/datatypes.py
Log:
Added a 'raw' datatype that does no conversion at all.
Modified: trunk/gnue-common/src/utils/datatypes.py
===================================================================
--- trunk/gnue-common/src/utils/datatypes.py 2007-01-02 11:02:38 UTC (rev
9193)
+++ trunk/gnue-common/src/utils/datatypes.py 2007-01-03 19:58:48 UTC (rev
9194)
@@ -41,8 +41,8 @@
Convert a value to a given target datatype.
@param value: The value to convert.
- @param datatype: Can be "text", "number", "date", "time", "datetime", or
- "boolean".
+ @param datatype: Can be "text", "number", "date", "time", "datetime",
+ "boolean", or "raw".
@param length: Length for "text" and "number" datatypes. C{None} means
"unlimited" number of digits.
@param scale: Scale for "number" datatype. C{None} means "unlimited" number
@@ -58,6 +58,9 @@
# "None" is always valid, independent of data type
result = None
+ elif datatype == "raw":
+ result = value
+
elif datatype == "text":
if isinstance(value, unicode):
result = value
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [gnue] r9194 - trunk/gnue-common/src/utils,
reinhard <=