<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Wed, Jan 7, 2015 at 11:02 AM, Bruce Leban <span dir="ltr"><<a href="mailto:bruce@leban.us" target="_blank">bruce@leban.us</a>></span> 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"><div>There is a problem here but that's not it. The problem is that </div><div><br></div></div></div><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><div class="gmail_extra"><div class="gmail_quote"><div><font face="monospace, monospace" color="#ff0000">float("nan") is float("nan") => False</font></div></div></div><div class="gmail_extra"><div class="gmail_quote"><div><span style="color:rgb(255,0,0);font-family:monospace,monospace">math</span><font face="monospace, monospace" color="#ff0000">.nan is math.nan => True</font></div></div></div></blockquote><div class="gmail_extra"><div class="gmail_quote"><div><br></div><div>So is this an attractive nuisance that will make people think they can should use <font face="monospace, monospace">x is math.nan</font> instead of <font face="monospace, monospace">math.isnan(x)</font>? </div></div></div></div></blockquote><div><br></div><div>This "attractive nuisance" exists for ALL python objects, and is especially attractive for interned ints and strings.</div><div><br></div><div>I have a much harder time getting students to use "is None" than getting them to not use "is" elsewhere.</div><div><br></div><div>My summary:</div><div><br></div><div>there isn't a huge reason to add math.nan, but there is essentially zero cost -- what's the problem?</div><div><br></div><div>-Chris</div><div><br></div><div><br></div></div><div><br></div>-- <br><div class="gmail_signature"><br>Christopher Barker, Ph.D.<br>Oceanographer<br><br>Emergency Response Division<br>NOAA/NOS/OR&R            (206) 526-6959   voice<br>7600 Sand Point Way NE   (206) 526-6329   fax<br>Seattle, WA  98115       (206) 526-6317   main reception<br><br><a href="mailto:Chris.Barker@noaa.gov" target="_blank">Chris.Barker@noaa.gov</a></div>
</div></div>