[Michael Hudson] >>> Would it make (more) sense to implement rich comparisons for floats? [Tim] >> Not much. [Michael] > But a little bit? It might at least make the results closer to what > the underlying C compiler does (modulo bugs in same, of course). The intended behavior of NaNs is covered precisely by standards. Moving Python's nonsense behavior closer to the platform C's nonsense behavior doesn't scream "useful" to me. But I don't object to it either, if someone can't think of something better to do with their time <wink>. At least gcc users would get something much closer to what the standard intends (although their Python wouldn't be portable in these respects). OTOH, by pure accident, NaN==NaN *happens* to return the intended False today under Windows Python, and if that's changed, via rich comparison, to return True (which MSVC returns for the C expression NaN==NaN), then we've also managed to break currently-working code on Windows. 754 really isn't friendly to half-assed support.
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