Message110312
> 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. |
|
Date |
User |
Action |
Args |
2010-07-14 18:59:51 | mark.dickinson | set | recipients:
+ mark.dickinson, theller, hannes.reuter |
2010-07-14 18:59:51 | mark.dickinson | set | messageid: <1279133991.81.0.16058318543.issue9249@psf.upfronthosting.co.za> |
2010-07-14 18:59:50 | mark.dickinson | link | issue9249 messages |
2010-07-14 18:59:50 | mark.dickinson | create | |
|