On Tue, Mar 16, 2010 at 2:58 PM, Facundo Batista
<facundobati...@gmail.com> wrote:
> On Tue, Mar 16, 2010 at 9:41 AM, Mark Dickinson <dicki...@gmail.com> wrote:
>
>> On the one hand there's something to be said for maintaining a clean
>> separation between the float and Decimal types, allowing only explicit
>> conversions from one to the other;  mixed-type arithmetic between
>> floats and Decimals was very deliberately not permitted in the
>> original PEP, and that's unlikely to change in a hurry.  On the other
>
> But, to be fair, we didn't have "true value of the float at that time".

That's true.  I'd still be reluctant to start supporting operations
like Decimal('1.2') + 0.71, though.  At least comparisons have the
nice feature that the return type is unambiguous.

>
> I'm +0 to allow these comparisons, being "Decimal(1) < .3" the same as
> "Decimal(1) < Decimal.from_float(.3)"

Yes, I should have clarified that those are exactly the semantics I'm proposing.

Thanks!

Mark
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to