[issue32648] Wrong byte count with struct

Róbert Lexmann report at bugs.python.org
Wed Jan 24 08:04:15 EST 2018


Róbert Lexmann <robo.lexmann at gmail.com> added the comment:

Thanks for a fast response. If I may ask, what is it good for to encode 
'id' in 16 bytes and 'di' in 12?

Rob

On 01/24/2018 12:00 PM, Christian Heimes wrote:
> Christian Heimes <lists at cheimes.de> added the comment:
>
> It's not a bug. Please read the section about padding.
>
>>>> struct.calcsize('id')
> 16
>>>> struct.calcsize('>id')
> 12
>
> ----------
> nosy: +christian.heimes
> resolution:  -> not a bug
> stage:  -> resolved
> status: open -> closed
>
> _______________________________________
> Python tracker <report at bugs.python.org>
> <https://bugs.python.org/issue32648>
> _______________________________________

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue32648>
_______________________________________


More information about the Python-bugs-list mailing list