This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author skrah
Recipients mark.dickinson, rhettinger, skrah
Date 2010-12-08.13:56:10
SpamBayes Score 1.8602e-06
Marked as misclassified No
Message-id <>
I'm not sure if this is a documentation issue or a bug. If watchexp=0,
quantize() also allows any number of digits:

>>> x = Decimal("6885998238912213556789006667970467609814")
>>> y = Decimal("1e2")
>>> x.quantize(y)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python3.2/", line 2488, in quantize
    'quantize result has too many digits for current context')
  File "/usr/local/lib/python3.2/", line 3925, in _raise_error
    raise error(explanation)
decimal.InvalidOperation: quantize result has too many digits for current context
>>> x.quantize(y, watchexp=0)
Date User Action Args
2010-12-08 13:56:15skrahsetrecipients: + skrah, rhettinger, mark.dickinson
2010-12-08 13:56:15skrahsetmessageid: <>
2010-12-08 13:56:10skrahlinkissue10650 messages
2010-12-08 13:56:10skrahcreate