Robin Becker wrote:
sizeofint = struct.calcsize("i")
well if I wish to store 4 bits/int then this works
calcsize returns the number of 8-bit characters the format string needs to store the given C types.
import struct print struct.calcsize("i")
but I assume we can store more than 4 bits per int, so waht tells us we cans store 8 bits/struct unit?
characters map to 8 bits == 1 byte and it's rather unlikely that a C compiler will use a different mapping any time soon.