[issue7630] Strange behaviour of decimal.Decimal

Mark Dickinson report at bugs.python.org
Mon Jan 4 09:58:29 CET 2010


Mark Dickinson <dickinsm at gmail.com> added the comment:

You don't say what behaviour you were expecting!   :)

By design, almost all Decimal operations (but not creation of a Decimal from an integer or string) round to the precision given by the current context.  By default that precision is 28 significant digits.  See the documentation, particularly the quick-start tutorial,

http://docs.python.org/library/decimal.html#quick-start-tutorial

for more information, including how to change the default precision.

----------
nosy: +mark.dickinson
resolution:  -> invalid
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue7630>
_______________________________________


More information about the Python-bugs-list mailing list