<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On Mar 26, 2010, at 2:16 PM, Xavier Morel wrote:</div><blockquote type="cite"><div><blockquote type="cite"><font class="Apple-style-span" color="#000000"><br></font></blockquote>How about raising an exception instead of creating nans in the first place, except maybe within specific contexts (so that the IEEE-754 minded can get their nans working as they currently do)?<br></div></blockquote></div><br><div>-1 &nbsp;</div><div><br></div><div>The numeric community uses NaNs as placeholders in vectorized calculations.</div><div>People do use them and there's no point in breaking their code.</div><div><br></div><div>Of the ideas I've seen in this thread, only two look reasonable:</div><div><br></div><div>* Do nothing. &nbsp;This is attractive because it doesn't break anything.</div><div><br></div><div>* Have float.__eq__(x, y) return True whenever x and y are</div><div>&nbsp;&nbsp; the same NaN object. &nbsp;This is attractive because it is a</div><div>&nbsp;&nbsp; minimal change that provides a little protection for&nbsp;</div><div>&nbsp;&nbsp; simple containers.</div><div><br></div><div>I support either of those options.</div><div><br></div><div><br></div><div>Raymond</div><div>&nbsp;&nbsp;&nbsp;</div></body></html>