On 11 Mar 2014 01:02, "Guido van Rossum" <guido@python.org> wrote:
>
> On Mon, Mar 10, 2014 at 7:22 AM, Mark Dickinson <dickinsm@gmail.com> wrote:
>>
>> On Mon, Mar 10, 2014 at 1:53 PM, Stefan Krah <stefan@bytereef.org> wrote:
>>
>>> That is why I think we should seriously consider moving to IEEE semantics
>>> for a decimal literal.
>>
>>
>> I think that would make a *lot* of sense.
>
>
> What's the proposal? Just using decimal64 for decimal literals, or introducing decimal64 as a new builtin type? (I could get behind either one.)

My take is that we're down to two main options:

Stefan: use the existing decimal type, change default context to Decimal64, round all decimal literals to current context

Oscar: new fixed width decimal64 builtin type, always uses Decimal64 context (allowing constant folding), interoperates with variable context decimal.Decimal values (producing a decimal.Decimal result)

I lean towards Oscar's proposal, as it removes the hidden context dependent behaviour and makes the builtin decimals true constant values.

Perhaps Stefan & Oscar would be willing to collaborate on a PEP that sums up the pros and cons of the two main alternatives (as well as some of the other variants that were discussed and rejected)?

(Adding the IEEE contexts to the decimal module sounds like a good idea regardless)

Cheers,
Nick.

>
> --
> --Guido van Rossum (python.org/~guido)
>
> _______________________________________________
> Python-ideas mailing list
> Python-ideas@python.org
> https://mail.python.org/mailman/listinfo/python-ideas
> Code of Conduct: http://python.org/psf/codeofconduct/