Message71050
I like to challenge the view what "correct" behavior is here. If I
pickle an array of 32-bit integer values on one system, and unpickle it
as an array of 64-bit integer values on a different system, is that
correct, or incorrect?
IMO, correct behavior would preserve the width as much as possible. For
integers, this should be straight-forward, as it should be for floats
and doubles (failing to unpickle them if the target system doesn't
support a certain format). For Unicode, I think the array module should
grow platform-independent width, for both 2-byte and 4-byte Unicode.
When pickling, the pickle should always use network byte order;
alternatively, the pickle should contain a byte order marker (presence
of which could also be used as an indication that the new array pickle
format is used). IOW, <i would indicate little-endian four byte
integers, and so on. |
|
Date |
User |
Action |
Args |
2008-08-12 10:11:12 | loewis | set | recipients:
+ loewis, gvanrossum, rhettinger, jcea, hniksic, alexandre.vassalotti, benjamin.peterson |
2008-08-12 10:11:11 | loewis | set | messageid: <1218535871.88.0.299553867499.issue2389@psf.upfronthosting.co.za> |
2008-08-12 10:11:10 | loewis | link | issue2389 messages |
2008-08-12 10:11:09 | loewis | create | |
|