This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author mark.dickinson
Recipients hannes.reuter, mark.dickinson, theller
Date 2010-07-14.18:59:50
SpamBayes Score 0.00020401039
Marked as misclassified No
Message-id <1279133991.81.0.16058318543.issue9249@psf.upfronthosting.co.za>
In-reply-to
Content
> However, as my system is a little endian one(e.g.
> sys.byteorder=little), whats the difference between native and little

Native mode uses:  native size, native byteorder and alignment that
  matches your platform
Little endian: standard size, little-endian, no alignment

The *native* size means the size of the corresponding C type (e.g., as computed by sizeof) on your platform.  So on a typical 64-bit Unix-alike platform, that's 8 for 'l' and 'L'; on 64-bit Windows and most 32-bit platforms, it's 4 for 'l' and 'L'.

The *standard* size is as given by the table.  It's the same on all platforms.

It's true that on most common platforms the 'l' and 'L' codes are the only ones likely to differ.

> b) Where could I look up/find such a native format table ?
Why not just use struct.calcsize?

This is all explained in the docs;  I'm going to close this issue, since I don't think there's any discrepancy between the docs and the behaviour of the module.

However, if you have ideas for specific improvements to the documentation, please do open another issue.
History
Date User Action Args
2010-07-14 18:59:51mark.dickinsonsetrecipients: + mark.dickinson, theller, hannes.reuter
2010-07-14 18:59:51mark.dickinsonsetmessageid: <1279133991.81.0.16058318543.issue9249@psf.upfronthosting.co.za>
2010-07-14 18:59:50mark.dickinsonlinkissue9249 messages
2010-07-14 18:59:50mark.dickinsoncreate