> From: Edward Loper > > If we *really* want nan==nan to be false, then it seems like > we have to > say that nan is unhashable. Hmm - I suppose we could make a subclass of float specifically for NaN, and have that be a singleton. The float constructor could check for a NaN result, and return this singleton. I'm worried that there might be a slowdown though. > I'm also disturbed by the fact > that cmp() > has something different to say about their equality: > > >>> cmp(float('nan'), float('nan')) > 0 Hmm - I guess it should technically throw an exception. However, I'd be happy if it returned -1. Would this affect the stability of sorting? Tim Delaney
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