[Python-Dev] Mixing float and Decimal -- thread reboot

Adam Olsen rhamph at gmail.com
Tue Mar 23 18:48:20 CET 2010


On Tue, Mar 23, 2010 at 11:31, Mark Dickinson <dickinsm at gmail.com> wrote:
> Agreed, notwithstanding the above comments.  Though to avoid the
> problems described above, I think the only way to make this acceptable
> would be to prevent hashing of signaling nans.  (Which the decimal
> module current does; it also prevents hashing of quiet NaNs, but I
> can't see any good rationale for that.)

a = Decimal('nan')
a != a

They don't follow the behaviour required for being hashable.

float NaN should stop being hashable as well.


-- 
Adam Olsen, aka Rhamphoryncus


More information about the Python-Dev mailing list