On Thu, Apr 28, 2011 at 12:42 PM, Stephen J. Turnbull <stephen at xemacs.org> wrote: > Mark Dickinson writes: > > > Declaring that 'nan == nan' should be True seems attractive in > > theory, > > No, it's intuitively attractive, but that's because humans like nice > continuous behavior. In *theory*, it's true that some singularities > are removable, and the NaN that occurs when evaluating at that point > is actually definable in a broader context, but the point of NaN is > that some singularities are *not* removable. This is somewhat > Pythonic: "In the presence of ambiguity, refuse to guess." Refusing to guess in this case would be to treat all NaNs as signalling NaNs, and that wouldn't be good, either :) I like Terry's suggestion for a glossary entry, and have created an updated proposal at http://bugs.python.org/issue11945 (I also noted that array.array is like collections.Sequence in failing to enforce the container invariants in the presence of NaN values) Cheers, Nick. -- Nick Coghlan | ncoghlan at gmail.com | Brisbane, Australia
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4