pickle broken: can't handle NaN or Infinity under win32
Scott David Daniels
Scott.Daniels at Acm.Org
Wed Jun 22 19:03:25 EDT 2005
Paul Rubin wrote:
> Scott David Daniels <Scott.Daniels at Acm.Org> writes:
>
>>>Negative 0 isn't a NaN, it's just negative 0.
>>
>>Right, but it is hard to construct in standard C.
>
>
> Huh? It's just a hex constant.
Well, -0.0 doesn't work, and (double)0x80000000 doesn't work,
and.... I think you have to use quirks of a compiler to create
it. And I don't know how to test for it either, x < 0.0 is
not necessarily true for negative 0.
I am not trying to say there is no way to do this. I am
trying to say it takes thought and effort on every detail,
in the definition, implementations, and unit tests.
--Scott David Daniels
Scott.Daniels at Acm.Org
More information about the Python-list
mailing list