On Jun 26, 12:38 pm, "Steven Clark" <[EMAIL PROTECTED]> wrote: > On Wed, Jun 25, 2008 at 7:03 PM, John Machin <[EMAIL PROTECTED]> wrote: > > On Jun 26, 9:00 am, "Steven Clark" <[EMAIL PROTECTED]> wrote: > >> Can anyone explain to me why > >> struct.pack('HB',1,2) gives 3 bytes, whereas struct.pack('BH',1,2) > >> gives 4 bytes? > > > Alignment -- read the manual. > > -- > >http://mail.python.org/mailman/listinfo/python-list > > If "the manual" is the help files for the struct module, I've read it > several times over. I understand endianness; I don't understand > alignment. Could anyone give a less cryptic / terse answer?
google("struct alignment") -- http://mail.python.org/mailman/listinfo/python-list