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 martin.panter
Recipients mark.dickinson, martin.panter, skrah
Date 2016-04-13.10:21:19
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1460542879.64.0.422969527412.issue26746@psf.upfronthosting.co.za>
In-reply-to
Content
This behaviour seems to be documented, although it is not very explicit, and a bit surprising to me. See the third note at the end of <https://docs.python.org/3/library/struct.html#byte-order-size-and-alignment>: “align the end . . . with a repeat count of zero”, and the example

>>> pack('llh0l', 1, 2, 3)
b'\x00\x00\x00\x01\x00\x00\x00\x02\x00\x03\x00\x00'
History
Date User Action Args
2016-04-13 10:21:19martin.pantersetrecipients: + martin.panter, mark.dickinson, skrah
2016-04-13 10:21:19martin.pantersetmessageid: <1460542879.64.0.422969527412.issue26746@psf.upfronthosting.co.za>
2016-04-13 10:21:19martin.panterlinkissue26746 messages
2016-04-13 10:21:19martin.pantercreate