[Tutor] struct question

Alan Gauld alan.gauld at btinternet.com
Wed Feb 4 02:02:58 CET 2009


"bob gailer" <bgailer at gmail.com> wrote 

> >>> struct.calcsize('s')
> 1
> >>> struct.calcsize('d')
> 8
> >>> struct.calcsize('sd')
> 16
> 
> Why? Should not that be 9?

Numbers always start on word boundaries.

>>> struct.calcsize('ds')
9

Alan G.




More information about the Tutor mailing list