You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is working as designed: the result of struct.calcsize matches the length of the string that you'll get back from struct.pack using that format. Padding isn't included after the last entry in the struct.
That's not to say that it was a good design decision, but that's the design that was chosen, and it's not realistic to change this for the bugfix releases. It may be possible to do something for Python 3.4.
You can add a '0L' to the end of your struct to force padding bytes at the end. See:
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: