On Mar 19, 2010, at 2:50 PM, Guido van Rossum wrote:

> I'd like to reboot this thread. I've been spinning this topic in my
> head for most of the morning, and I think we should seriously
> reconsider allowing mixed arithmetic involving Decimal, not just mixed
> comparisons. [Quick summary: embed Decimal in the numeric tower but
> add a context flag to disallow implicit mixing of float and Decimal.]


Making decimals first class citizens would sure help eliminate 
some special cases and anomalies. 

If a context flag were added, am wondering whether it should simply
provide a warning rather than flat-out disallowing the transaction.
The whole point is to highlight accidental mixing.

If the mixed arithmetic were allowed, then the decimal constructor
should be changed to match (i.e. accept float inputs instead of
requiring Decimal.from_float()).


Raymond


_______________________________________________
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