It would appear that Decimals actually can't hold arbitrarily long numbers:
>>> d = Decimal('10') ** Decimal('100000000000000000000') Traceback (most recent call last): File "<stdin>", line 1, in <module> decimal.Overflow: [<class 'decimal.Overflow'>]
Indeed, I never heard that arbitrarily long numbers was the point of Decimal - just proper rounding and decimals of arbitrary precision. If you want an arbitrarily long number, that's what longs are for, and in Python3 that's just what you've got.
>>> d = 10 ** 100000000000000000000
(Though it takes a long long while to compute this. My Mac book with I believe a core i5 still hasn't finished after a couple of minutes. Heck, even the string 1, followed by all those zeroes, is going to be really really big.)
For further kicks and grins, I discovered that you can configure the overflow value, apparently, though you still can't get such a whopping big number:
>>> from decimal import getcontext >>> getcontext().Emax = 100000000000000000000 Traceback (most recent call last): File "<stdin>", line 1, in <module> OverflowError: Python int too large to convert to C ssize_t
decimal.Overflowcould be expected rather than adecimal.InvalidOperation, what is always related to an operation. In your example, there is no operation at all.1e+100000000000000000000is useful for :)