On Fri, Mar 14, 2008 at 5:01 AM, Imri Goldberg <lorgandon@gmail.com> wrote:
Alright, I agree it's a good idea to drop the proposal to changing
floating point == into an epsilon compare.
What about issuing a warning though?
Consider the following course of action. It is the one with the least
changes:

== for regular floating point numbers now issues a warning, but still
works. This warning might be turned off. All other operators are left
unchanged.

Do you think this should be dropped as well?

To be honest, yes.  There isn't currently a SmellyCodeWarning or
IsThatReallyWhatYouMeanWarning in Python, and there doesn't
seem to be a lot of precedent for warning on code constructs that
may often be wrong but also have legitimate uses.  Most of
the current warnings have more to do with syntactic or semantic
changes between various versions of Python.

But I think it would be entirely appropriate to warn about
floating-point (in)equality checks in something like PyChecker
or Pylint, if you can get past the technical difficulties of detecting
floating-point comparisons statically.

 Mark