struct.pack behavior

John Machin sjmachin at lexicon.net
Thu Jun 26 01:03:52 CEST 2008


On Jun 26, 9:00 am, "Steven Clark" <steven.p.cl... at gmail.com> 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.



More information about the Python-list mailing list