[Erp5-report] r34572 jerome - /erp5/trunk/products/ERP5Type/patches/sqlvar.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Thu Apr 15 10:43:03 CEST 2010
Author: jerome
Date: Thu Apr 15 10:43:01 2010
New Revision: 34572
URL: http://svn.erp5.org?rev=34572&view=rev
Log:
when indexing float, use repr rather than str to have better precision
Modified:
erp5/trunk/products/ERP5Type/patches/sqlvar.py
Modified: erp5/trunk/products/ERP5Type/patches/sqlvar.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5Type/patches/sqlvar.py?rev=34572&r1=34571&r2=34572&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Type/patches/sqlvar.py [utf8] (original)
+++ erp5/trunk/products/ERP5Type/patches/sqlvar.py [utf8] Thu Apr 15 10:43:01 2010
@@ -54,7 +54,9 @@
if v[-1:]=='L':
v=v[:-1]
atof(v)
- else: v=str(float(v))
+ # ERP5 patch, we use repr that have better precision than str for
+ # floats
+ else: v=repr(float(v))
except:
if not v and args.has_key('optional') and args['optional']:
return 'null'
More information about the Erp5-report
mailing list