Message185837
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:
http://docs.python.org/2/library/struct.html#examples
for an example of this.
See also #7189, #5145. |
|
Date |
User |
Action |
Args |
2013-04-02 13:34:06 | mark.dickinson | set | recipients:
+ mark.dickinson, boa124 |
2013-04-02 13:34:06 | mark.dickinson | set | messageid: <1364909646.88.0.351139033381.issue17617@psf.upfronthosting.co.za> |
2013-04-02 13:34:06 | mark.dickinson | link | issue17617 messages |
2013-04-02 13:34:06 | mark.dickinson | create | |
|