]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
- Clarified use of python's Decimal
authorJason Kirtland <jek@discorporate.us>
Sun, 18 Nov 2007 19:01:42 +0000 (19:01 +0000)
committerJason Kirtland <jek@discorporate.us>
Sun, 18 Nov 2007 19:01:42 +0000 (19:01 +0000)
lib/sqlalchemy/types.py

index b27530987697ae1cc13b2af09f0534b9dc7e5157..0f93b8e349b983ebfc427847a8bd1f844c649e9b 100644 (file)
@@ -17,7 +17,7 @@ import inspect
 import datetime as dt
 
 from sqlalchemy import exceptions
-from sqlalchemy.util import Decimal, pickle
+from sqlalchemy.util import pickle, Decimal as _python_Decimal
 
 class _UserTypeAdapter(type):
     """adapts 0.3 style user-defined types with convert_bind_param/convert_result_value
@@ -384,7 +384,7 @@ class Numeric(TypeEngine):
         if self.asdecimal:
             def process(value):
                 if value is not None:
-                    return Decimal(str(value))
+                    return _python_Decimal(str(value))
                 else:
                     return value
             return process