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
No struct.pack exception for some out of range integers #42138
Comments
struct.pack("B", -1) generates an OverflowError But struct.pack("I", -1) and struct.pack("L", -1) do |
Logged In: YES Attaching patch, raises struct.error. Neal, please look over it. Note that I find struct's error handling confusing: it's not |
Logged In: YES Also it appears that there is some kind of interference import struct; struct.pack("H", 70000) #Exception
import struct; struct.pack(">H", 70000) # no exception |
Logged In: YES Assigning to Bob since he rewrote/extended the struct module |
Logged In: YES The test suite now covers this issue and it's fixed in revision 46320. Note that this is definitely a backwards incompatible change and we might have |
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: