Mark Dickinson <dicki...@gmail.com> added the comment:

Please note that the docs distinguish 'standard size and alignment' from 
'native size and alignment'.  The standard size (which is what you get if your 
struct format string doesn't start with '<', '>', '=' or '!') does exactly what 
you suggest:  it gives struct codes a fixed size that's independent of platform.

>>> import struct
>>> struct.calcsize('L')   # native size and alignment
8
>>> struct.calcsize('<L')  # standard size and alignment
4

----------
nosy: +mark.dickinson

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue8069>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to