[Python-Dev] decimal.py: == and != comparisons involving NaNs (original) (raw)
Antoine Pitrou solipsis at pitrou.net
Mon Nov 9 13:34:54 CET 2009
- Previous message: [Python-Dev] decimal.py: == and != comparisons involving NaNs
- Next message: [Python-Dev] decimal.py: == and != comparisons involving NaNs
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Stefan Krah <stefan-usenet bytereef.org> writes:
I see the point, but Decimal("NaN") does not hash:
Ok but witness again:
L = [1, 2, Decimal("NaN"), 3] 3 in L True class H(object): ... def eq(self, other): raise ValueError ... L = [1, 2, H(), 3] 3 in L Traceback (most recent call last): File "", line 1, in File "", line 2, in eq ValueError
(NB: interestingly, float("nan") does hash)
Regards
Antoine.
- Previous message: [Python-Dev] decimal.py: == and != comparisons involving NaNs
- Next message: [Python-Dev] decimal.py: == and != comparisons involving NaNs
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]