A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2010-March/098577.html below:

[Python-Dev] Mixing float and Decimal -- thread reboot

[Python-Dev] Mixing float and Decimal -- thread reboot [Python-Dev] Mixing float and Decimal -- thread rebootRaymond Hettinger raymond.hettinger at gmail.com
Fri Mar 19 23:36:38 CET 2010
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


More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4