Peter Hansen wrote: > >>> d = decimal.Decimal('199.999') > >>> decimal.getcontext().rounding = decimal.ROUND_FLOOR > >>> d.quantize(decimal.Decimal('1.00')) > Decimal("199.99")
Or skip changing the context and use the second argument to quantize: d.quantize(Decimal('1.00'), decimal.ROUND_FLOOR) -Peter -- http://mail.python.org/mailman/listinfo/python-list