pyt...@lists.fastmail.net <pyt...@lists.fastmail.net> wrote: > I have various decimals which eventually are written to an XML file. > Requirements indicate a precision of 11. I am currently having some > 'issues' with Decimal("0"). When using > quantize(decimal.Decimal("1e-11")) the result is not 0.00000000000, but > 1e-11. > > Personally I agree 1e-11 is a better notation than 0.00000000000, but I > currently need the long one. Is there a way to overwrite the switch to > the scientific notation? Apparently there is a switch in notation > 'between' 1e-6 and 1e-7.
Try: >>> format(Decimal("0"), ".11f") '0.00000000000' Stefan Krah -- http://mail.python.org/mailman/listinfo/python-list