[Python-Dev] Re: marshal / unmarshal
skip at pobox.com
Sat Apr 9 14:30:04 CEST 2005
Martin> Yet, this *still* is a platform dependence. Python makes no
Martin> guarantee that 1e1000 is a supported float literal on any
Martin> platform, and indeed, on your platform, 1e1000 is not supported
Martin> on your platform.
Are float("inf") and float("nan") supported everywhere? I don't have ready
access to a Windows machine, but on the couple Linux and MacOS machines
at-hand they are. As a starting point can it be agreed on whether they
should be supported? (There is a unique IEEE-754 representation for both
values, right? Should we try and support any other floating point format?)
If so, the float("1e10000") == float("inf") in all cases, right? If not,
then Python's lexer should be trained to know what out-of-range floats are
and complain when it encounters them. In either case, we should then know
how to fix marshal.loads (and probably pickle.loads).
That seems like it would be a start in the right direction.
More information about the Python-Dev