On 11 Mar 2014 23:31, "Antoine Pitrou" <solipsis@pitrou.net> wrote:

>

> Le 11/03/2014 11:51, Oscar Benjamin a écrit :

>

>

>> The decimal.Decimal type is IMO overly complex

>> and should really be for niche use-cases like other non-stdlib

>> multi-precision numeric types.

>

>

> What is complex about it?

What is the result of "Decimal('1.0') + Decimal('1e70')"?

Correct answer: insufficient data (since we don't know the current precision).

That becomes a substantially more questionable answer for "1.0d + 1e70d". Having apparent numeric literals that can't be constant folded would be a much bigger design wart than having two different kinds of decimal.

Cheers,

Nick.