<div class="gmail_quote">On Fri, Mar 14, 2008 at 5:01 AM, Imri Goldberg <<a href="mailto:lorgandon@gmail.com">lorgandon@gmail.com</a>> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="Ih2E3d">Alright, I agree it's a good idea to drop the proposal to changing<br></div>
floating point == into an epsilon compare.<br>
What about issuing a warning though?<br>
Consider the following course of action. It is the one with the least<br>
changes:<br>
<br>
== for regular floating point numbers now issues a warning, but still<br>
works. This warning might be turned off. All other operators are left<br>
unchanged.</blockquote><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<br>
Do you think this should be dropped as well?</blockquote><div><br class="webkit-block-placeholder"></div><div>To be honest, yes.  There isn't currently a SmellyCodeWarning or</div><div>IsThatReallyWhatYouMeanWarning in Python, and there doesn't</div>
<div>seem to be a lot of precedent for warning on code constructs that</div><div>may often be wrong but also have legitimate uses.  Most of</div><div>the current warnings have more to do with syntactic or semantic</div><div>
changes between various versions of Python.</div><div><br></div><div>But I think it would be entirely appropriate to warn about</div><div>floating-point (in)equality checks in something like PyChecker</div><div>or Pylint, if you can get past the technical difficulties of detecting</div>
<div>floating-point comparisons statically.</div><div><br class="webkit-block-placeholder"></div><div> Mark</div></div>