"pjcoup" <pjc...@gmail.com> wrote in message news:b1537079-6e3a-43e1-814b-7ccf185fb...@v15g2000prn.googlegroups.com...
> I would have expected calcsize('BhhhhB') to be either 10 or 12 > (padding), but 11? Is there a simple explanation of what is going > on here? The purpose of the padding is to align the words 'naturally'. That is, when reading two bytes, to start at an even number. B X B h1 h1 h1 h1 h2 h2 h2 h2 h3 h3 h3 h3 h4 h4 h4 h4 B B Y The padding at X lines up h1-h4. There isn't any point putting padding at Y. -- http://mail.python.org/mailman/listinfo/python-list