Martin Panter added the comment:

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'

----------
nosy: +martin.panter

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue26746>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to