Variables different between .py and .pyc

Tim Peters tim.one at home.com
Tue May 8 04:50:40 CEST 2001


[Joshua Marshall]
> Why was the decision made to store floats with %g instead of storing
> the raw bits directly?

.pyc files are supposed to be portable.  A string representation of floats is
the only semi-portable representation there is (and especially when the .pyc
format was first developed around 1990:  if was *usual* then for N different
vendors to use N*1.75 different fp formats <0.175 wink>).





More information about the Python-list mailing list