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 loewis
Recipients alexandre.vassalotti, benjamin.peterson, gvanrossum, hniksic, jcea, loewis, rhettinger
Date 2008-08-12.10:11:09
SpamBayes Score 4.59468e-07
Marked as misclassified No
Message-id <1218535871.88.0.299553867499.issue2389@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2008-08-12 10:11:12loewissetrecipients: + loewis, gvanrossum, rhettinger, jcea, hniksic, alexandre.vassalotti, benjamin.peterson
2008-08-12 10:11:11loewissetmessageid: <1218535871.88.0.299553867499.issue2389@psf.upfronthosting.co.za>
2008-08-12 10:11:10loewislinkissue2389 messages
2008-08-12 10:11:09loewiscreate