On Mon, Nov 9, 2009 at 12:21 PM, Stefan Krah <stefan-usenet at bytereef.org> wrote: > I see the point, but Decimal("NaN") does not hash: > >>>> hash(Decimal("NaN")) > Traceback (most recent call last): > File "<stdin>", line 1, in <module> > File "/usr/lib/python2.7/decimal.py", line 937, in __hash__ > raise TypeError('Cannot hash a NaN value.') > TypeError: Cannot hash a NaN value. I think that may represent an excess of caution. float nans do hash quite happily, and I can't see a good reason for preventing Decimal nans from having a hash. Mark
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