New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
struct.calcsize('cd') returns 16 instead of 9 #49395
Comments
struct.calcsize('cd') returns 16 instead of 9 struct.calcsize('dc') returns 9 as expected |
Someone pointed out that one must consider alignment. I had overlooked Perhaps the documentation should mention alignment. |
The docs have this sentence: """ What would you suggest be added? |
The default endiand and alignment is "native". Using <, >, = or ! Python 3.1a0 (py3k:69105M, Feb 3 2009, 15:04:35)
>>> struct.calcsize('cd')
12
>>> struct.calcsize('=cd')
9
>>> struct.calcsize('<cd')
9 |
Sorry, but I don't see this issue as a bug because it's related to I choose to close this issue. If you think that the documentation |
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: