<br><br><div class="gmail_quote">On Wed Jan 07 2015 at 5:20:04 PM Guido van Rossum <<a href="mailto:guido@python.org">guido@python.org</a>> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Wed, Jan 7, 2015 at 2:13 PM, Chris Angelico <span dir="ltr"><<a href="mailto:rosuav@gmail.com" target="_blank">rosuav@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span>On Thu, Jan 8, 2015 at 6:02 AM, Bruce Leban <<a href="mailto:bruce@leban.us" target="_blank">bruce@leban.us</a>> wrote:<br>
> There is a problem here but that's not it. The problem is that<br>
><br>
> float("nan") is float("nan") => False<br>
> math.nan is math.nan => True<br>
><br>
><br>
> So is this an attractive nuisance that will make people think they can<br>
> should use x is math.nan instead of math.isnan(x)? Hopefully not but<br>
> something to consider. Pylint should flag this usage.<br>
<br>
</span>I don't think that's a problem. Using 'is' to test floating-point<br>
values is already broken: </blockquote></div></div></div><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"> [...]<br clear="all"></blockquote><div><br></div><div>Correct. And the first half of the thread was comparing the convenience of defining a nan constant at the top of your module using "nan = float('nan')" with "from math import nan". That would have the exact same 'is' problem.<br><br>There is no attractive nuisance here except that this thread itself is wasting everybody's time. :-<br>)</div></div></div></div></blockquote><div><br></div><div>Exactly. Someone should file a bug to track this and then nosy <span style="color:rgb(62,67,73);font-family:Arial,sans-serif;font-size:14px;line-height:normal">mark.dickinson, rhettinger, stutzbach as specified in the experts index. Then the work can be tracked and be seen done.</span></div></div>