On Thu, Aug 29, 2019 at 11:19:58PM +0100, Rob Cliffe via Python-ideas wrote:
> Just curious: Is there any reason not to make decimal.Decimal a > built-in type? Yes: it is big and complex, with a big complex API that is over-kill for the major motivating use-case for a built-in decimal type. There might be a strong case for adding a fixed-precision decimal type, and leaving out the complex parts of the Decimal API: no variable precision, just a single rounding mode, no contexts, no traps. If you need the full API, use the decimal module; if you just need something like builtin floats, but in base 10, use the built-in decimal. There have been at least two proposals. Neither have got so far as a PEP. If I recall correctly, the first suggested using Decimal64: https://en.wikipedia.org/wiki/Decimal64_floating-point_format the second suggested Decimal128: https://en.wikipedia.org/wiki/Decimal128_floating-point_format -- Steven _______________________________________________ Python-ideas mailing list -- python-ideas@python.org To unsubscribe send an email to python-ideas-le...@python.org https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived at https://mail.python.org/archives/list/python-ideas@python.org/message/EEQXTA5MFTMEMTJJJM2GVPLSTG33SQXQ/ Code of Conduct: http://python.org/psf/codeofconduct/