c2c-oerpscenario team mailing list archive
-
c2c-oerpscenario team
-
Mailing list archive
-
Message #00495
[Bug 663045] [NEW] using the decimal module instead of __builtins__.float
Public bug reported:
I just had a look at the decimal module introduced in python 2.4 [1],
and after another glance at the float field.
Is there a reason why we don't use the rounding-agnostic decimal module
instead of the float type?
As far as I can see, only a few lines should be changed, something like
this in fields.py:float
_symbol_f = lambda x: decimal.Decimal(str(x) or '0.0')
[1]: http://docs.python.org/library/decimal.html
** Affects: openobject-server
Importance: Undecided
Status: New
--
using the decimal module instead of __builtins__.float
https://bugs.launchpad.net/bugs/663045
You received this bug notification because you are a member of C2C
OERPScenario, which is subscribed to OpenERP OpenObject.
Status in OpenObject Server: New
Bug description:
I just had a look at the decimal module introduced in python 2.4 [1], and after another glance at the float field.
Is there a reason why we don't use the rounding-agnostic decimal module instead of the float type?
As far as I can see, only a few lines should be changed, something like this in fields.py:float
_symbol_f = lambda x: decimal.Decimal(str(x) or '0.0')
[1]: http://docs.python.org/library/decimal.html
Follow ups
References