Rappresenting infinite

John Nagle nagle at animats.com
Tue Jul 3 01:09:16 EDT 2007


Robert Kern wrote:
> avassalotti at gmail.com wrote:
> 
> 
>>float('inf') works well, no?

> It is not cross-platform. The parsing of strings into floats and the string
> representation of floats is dependent on your system's C library. For these
> special values, this differs across platforms. Your code won't work on Windows,
> for example. 

    Yes.  This is CPython bug #1255395, status "open".
    Also CPython bug #44585 (Pickle fails on "inf" values)	

    PEP 42 contains excuses for not calling it a bug.

					John Nagle



More information about the Python-list mailing list