[Python-Dev] Mixing float and Decimal -- thread reboot
Stephen J. Turnbull
stephen at xemacs.org
Wed Mar 24 06:36:40 CET 2010
Steven D'Aprano writes:
> As usual though, NANs are unintuitive:
>
> >>> d = {float('nan'): 1}
> >>> d[float('nan')] = 2
> >>> d
> {nan: 1, nan: 2}
>
>
> I suspect that's a feature, not a bug.
I don't see how it can be so. Aren't all of those entries garbage?
To compute a histogram of results for computations on a series of
cases would you not have to test each result for NaN-hood, then hash
on a proxy such as the string "Nan"?
More information about the Python-Dev
mailing list