[Python-checkins] r46248 - python/trunk/Modules/_struct.c
Michael Hudson
mwh at python.net
Fri May 26 00:26:30 CEST 2006
Michael Hudson <mwh at python.net> writes:
> "bob.ippolito" <python-checkins at python.org> writes:
>
>> Author: bob.ippolito
>> Date: Thu May 25 21:56:56 2006
>> New Revision: 46248
>>
>> Modified:
>> python/trunk/Modules/_struct.c
>> Log:
>> Use faster struct pack/unpack functions for the endian table that
>> matches the host's
>
> Waa, be a little careful here; it is at least potentially possible
> that struct.pack('<d', ...) and struct.pack('d', ...) produce
> different output, even when the endianness would suggest they should
> be the same, because the '<d' version goes to heroic efforts to
> produce an IEEE 8 byte double even if that's not what the host
> uses natively.
"Never mind!" -- I see test_float found this out for you already.
Unit tests are great :)
Cheers,
mwh
--
Exam invigilation - it doesn't come much harder than that, esp if
the book you're reading turns out to be worse than expected.
-- Dirk Bruere, sci.physics.research
More information about the Python-checkins
mailing list