Message 160291 - Python tracker (original) (raw)
This example [1] assumes you are using a specific platform to check it out. I am using amd64, and I get different results. To fix, I prefix the format string with '>':
before: pack('hhl', 1, 2, 3)
after: pack('>hhl', 1, 2, 3)
1: http://hg.python.org/cpython/file/d3ddbad31b3e/Doc/library/struct.rst#l299