struct.pack behavior

John Machin sjmachin at lexicon.net
Wed Jun 25 19:03:52 EDT 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