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 dparolin
Recipients dparolin
Date 2008-08-01.00:17:03
SpamBayes Score 0.000516351
Marked as misclassified No
Message-id <1217549825.77.0.356584888827.issue3481@psf.upfronthosting.co.za>
In-reply-to
Content
Python Versions tested:
Windows 2.5.2 (r252:60911)
Debian Linux Python 2.4.4 

Example:
>>> import struct
>>> struct.pack('HL', 1, 1)

results in '\x01\x00\x00\x00\x01\x00\x00\x00'
although '\x01\x00\x01\x00\x00\x00' was expected.

if concatenated or done separately
>>> struct.pack('H', 1) + struct.pack('L', 1) 

result is as expected '\x01\x00\x01\x00\x00\x00'
or
'\x01\x00' and '\x01\x00\x00\x00' respectively

Error:
Length is 8 where it should be 6
This is as well true for "hl", "hL" and "Hl".


Free description:
I could not find another error regarding that, nor any information using
popular search.
Further no explanation found why that might be valid behaviour.

Regards,
Dominique
History
Date User Action Args
2008-08-01 00:17:06dparolinsetrecipients: + dparolin
2008-08-01 00:17:05dparolinsetmessageid: <1217549825.77.0.356584888827.issue3481@psf.upfronthosting.co.za>
2008-08-01 00:17:05dparolinlinkissue3481 messages
2008-08-01 00:17:03dparolincreate