Floating points from IEEE 754 doesn't depends from machine byte order and C double is always coded in 8 bytes as I know, On Tue, Mar 20, 2012 at 9:48 PM, Serhiy Storchaka <storchaka@gmail.com> wrote:
20.03.12 20:32, Guido van Rossum написав(ла):
Using the '<' and'>' prefixes to the format string you can force standard size and alignment. Do you have a specific bit of code in the stdlib in mind that is incorrectly using native alignment?
Hmm. It seems that I have been a temporary insanity. I just now noticed that these prefixes indicate not only endianess but also size. My fault. Excuse me for undue disturbance.
However, the trick with struct.unpack('dd') in Lib/json/decoder.py amazes me.
_______________________________________________ Python-ideas mailing list Python-ideas@python.org http://mail.python.org/mailman/listinfo/python-ideas
-- Thanks, Andrew Svetlov