Message110201
on http://docs.python.org/library/struct.html
in section 7.3.2.2. Format Characters in the table one can find that
L -> unsigned long -> integer-> should have a 4 byte dataspace.
(same applies for l), which seems to be correct -> 32bit/8=4
On a Ubuntu 64 , Python 2.6,
a) calcsize reports it uses 8 byte
b) by writing data to a file and reading it back in I could confirm that it uses as well 8 bytes of binary data -> ofile2.write(struct.pack('LL',int(x[0]), int(x[1])))
Q: Is that behavior what we see a Docu error ?
Q: Is that behavior what we see general struct problem ?
add1: in # 2263 e.g. we see problems for L type data in relation to np ?
add2: IMHO certainly not a padding problem like in #7355
for reproduction:
from struct import *
calcsize('H')
2 -> correct to docu
calcsize('f')
4 -> correct to docu
calcsize('L')
8 -> should be 4
calcsize('l')
8 -> should be 4
calcsize('x')
1 -> correct to docu
So either docu is wrong, or struct has an error. |
|
Date |
User |
Action |
Args |
2010-07-13 15:00:09 | hannes.reuter | set | recipients:
+ hannes.reuter, theller |
2010-07-13 15:00:09 | hannes.reuter | set | messageid: <1279033209.41.0.410142321642.issue9249@psf.upfronthosting.co.za> |
2010-07-13 15:00:06 | hannes.reuter | link | issue9249 messages |
2010-07-13 15:00:05 | hannes.reuter | create | |
|