pickle and infinity

Bart Ogryczak B.Ogryczak at gmail.com
Wed Nov 29 13:26:30 EST 2006


Fredrik Lundh wrote:
> Bart Ogryczak wrote:
>
> > I´ve got this problem with pickle, it seems it doesn´t handle
> > correctly infinite values (nor does Python return overflow/underflow
> > error).
>
> Python 2.X relies on the C library to serialize floats, and, as you've
> noticed, some C libraries can produce values that they themselves cannot
> read.

Actually I´d be very happy, if Python would throw FloatPointExeption,
rather then allow infinite values. Haven´t got idea how to do it.
fpectl would do the trick, but it´s not present nither on Solaris, nor
on Windows platform. And I´d need it on both.




More information about the Python-list mailing list