Portably generating infinity and NaN

skip at pobox.com skip at pobox.com
Sat Apr 14 14:18:21 EDT 2007


    Michael> If you're going to change CPython to do this, I think adopting
    Michael> PEP 754, and using the fpconst module would be better than
    Michael> changing how float() works when called on string literals. 

But PEP 754 will only work for architectures supporting IEEE 754.  I realize
that's the vast majority of systems, but aren't there still a few Crays and
VMS machines out there?  (Do those architectures support NaN and Inf?)

Skip



More information about the Python-list mailing list