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/098458.html below:

[Python-Dev] Decimal <-> float comparisons in py3k.

[Python-Dev] Decimal <-> float comparisons in py3k. [Python-Dev] Decimal <-> float comparisons in py3k.Greg Ewing greg.ewing at canterbury.ac.nz
Tue Mar 16 23:16:11 CET 2010
Mark Dickinson wrote:
> On Tue, Mar 16, 2010 at 3:58 PM, P.J. Eby <pje at telecommunity.com> wrote:
> 
>>If not, it might be confusing if a number that prints as '.1' compares
>>unequal to Decimal('.1').
> 
> Agreed, but this is just your everyday floating-point confusion, to be
> dealt with by social means (e.g., educating the programmer).

Seems to me that this education would mostly consist of saying
"don't compare floats and decimals", which is why I think that
disallowing them in the first place would be better.

Then if a programmer truly needs to compare them for some
reason, he has to be explicit about how to do it.

-- 
Greg
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