[Zope-dev] Decimal formatter truncating to 3 decimal places - why?

Hermann Himmelbauer dusty at qwer.tk
Thu May 7 09:10:40 EDT 2009


Hi,
In my code, I use the decimal.Decimal datatype, which I try to format like 
this:

formatter = self.request.locale.numbers.getFormatter('decimal')
formatted_value = formatter.format(value)

The problem is, that the decimal number is truncated (rounded) to 3 decimal 
places, e.g. 1.123456 -> 1.123.

Is there a way to stop this?

Best Regards,
Hermann

-- 
hermann at qwer.tk
GPG key ID: 299893C7 (on keyservers)
FP: 0124 2584 8809 EF2A DBF9  4902 64B4 D16B 2998 93C7


More information about the Zope-Dev mailing list