On Fri, 08 Apr 2005 10:18:05 -0700, Scott David Daniels <[EMAIL PROTECTED]> wrote:
>Bengt Richter wrote: >>>Aha! Same version (2.3.4): >>> >>>Idle: >>> >>> 1e10000 >>> 1.0 >>> >>> import struct; struct.pack('d', 1e10000) >>> '\x00\x00\x00\x00\x00\x00\xf0?' >>>(which is actually 1.0) >>> >>>python via command line (readline support): >>> >>> 1e10000 >>> 1.#INF >>> >>> import struct; struct.pack('d', 1e10000) >>> '\x00\x00\x00\x00\x00\x00\xf0\x7f' >>> >>>Note the difference in the final byte. Same results (command >>>line vs. Idle) for 2.4.1. >>> > >> Good aha, but ISTM one of them is more missing than different ;-) >> (I.e., returned packed string is length 7 vs 8) >In the first one, the final byte is '?' (I made the same mistake >myself when I first read it). > D'oh. Must always switch from driving glasses to computer glasses when reading NG ;-/ >Also note: > > float('1e10000') is 1.#INF both in Idle and from the command line. > >I suspect an Idle bug. > I'll trust you this time ;-) Regards, Bengt Richter -- http://mail.python.org/mailman/listinfo/python-list